fix tests to be more specific about AS query

This commit is contained in:
Wayne Witzel III 2016-06-13 09:39:52 -04:00
parent db16478830
commit 019c5bac04

View File

@ -13,7 +13,7 @@ def mock_feature_enabled(feature, bypass_database=None):
@pytest.fixture
def activity_stream_entry(organization, org_admin):
return ActivityStream.objects.filter(organization__pk=organization.pk, operation='associate').first()
return ActivityStream.objects.filter(organization__pk=organization.pk, user=org_admin, operation='associate').first()
@pytest.mark.skipif(not getattr(settings, 'ACTIVITY_STREAM_ENABLED', True), reason="Activity stream not enabled")
@mock.patch('awx.api.views.feature_enabled', new=mock_feature_enabled)