From 702ce85074bd43346a562448be637f319a2c7a23 Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Sat, 6 Feb 2016 08:57:44 -0500 Subject: [PATCH] change mocking behavior to be closer to the source --- awx/main/tests/functional/test_activity_streams.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/main/tests/functional/test_activity_streams.py b/awx/main/tests/functional/test_activity_streams.py index 39cda25514..cf2f81c9d9 100644 --- a/awx/main/tests/functional/test_activity_streams.py +++ b/awx/main/tests/functional/test_activity_streams.py @@ -10,10 +10,10 @@ from awx.main.middleware import ActivityStreamMiddleware from awx.main.models.activity_stream import ActivityStream from django.core.urlresolvers import reverse -def mock_feature_enabled(): +def mock_feature_enabled(feature, bypass_database=None): return True -@mock.patch('awx.api.license.feature_enabled', new=mock_feature_enabled) +@mock.patch('awx.api.views.feature_enabled', new=mock_feature_enabled) @pytest.mark.django_db def test_get_activity_stream_list(monkeypatch, organization, get, user): url = reverse('api:activity_stream_list') @@ -21,7 +21,7 @@ def test_get_activity_stream_list(monkeypatch, organization, get, user): assert response.status_code == 200 -@mock.patch('awx.api.license.feature_enabled', new=mock_feature_enabled) +@mock.patch('awx.api.views.feature_enabled', new=mock_feature_enabled) @pytest.mark.django_db def test_basic_fields(monkeypatch, organization, get, user): u = user('admin', True) @@ -40,7 +40,7 @@ def test_basic_fields(monkeypatch, organization, get, user): assert 'organization' in response.data['summary_fields'] assert response.data['summary_fields']['organization'][0]['name'] == 'test-org' -@mock.patch('awx.api.license.feature_enabled', new=mock_feature_enabled) +@mock.patch('awx.api.views.feature_enabled', new=mock_feature_enabled) @pytest.mark.django_db def test_middleware_actor_added(monkeypatch, post, get, user): u = user('admin-poster', True)