Fix deprecated usage of WaffleFlag.namespaced_flag_name

As of edx-toggles==1.2.0, the `WaffleFlag.namespaced_flag_name`
attribute is deprecated in favour of `WaffleFlag.name`.
This commit is contained in:
Régis Behmo
2020-12-15 12:28:57 +01:00
parent 89d182be62
commit f29e415353
6 changed files with 10 additions and 10 deletions

View File

@@ -548,7 +548,7 @@ class VideosHandlerTestCase(VideoUploadTestMixin, VideoUploadPostTestsMixin, Cou
@override_settings(AWS_ACCESS_KEY_ID='test_key_id', AWS_SECRET_ACCESS_KEY='test_secret', AWS_SECURITY_TOKEN='token')
@patch('boto.s3.key.Key')
@patch('boto.s3.connection.S3Connection')
@override_flag(waffle_flags()[ENABLE_DEVSTACK_VIDEO_UPLOADS].namespaced_flag_name, active=True)
@override_flag(waffle_flags()[ENABLE_DEVSTACK_VIDEO_UPLOADS].name, active=True)
def test_devstack_upload_connection(self, mock_conn, mock_key):
files = [{'file_name': 'first.mp4', 'content_type': 'video/mp4'}]
mock_key_instances = [
@@ -655,7 +655,7 @@ class VideosHandlerTestCase(VideoUploadTestMixin, VideoUploadPostTestsMixin, Cou
DEPRECATE_YOUTUBE_FLAG = waffle_flags()[DEPRECATE_YOUTUBE]
with patch.object(WaffleFlagCourseOverrideModel, 'override_value', return_value=data['course_override']):
with override_flag(DEPRECATE_YOUTUBE_FLAG.namespaced_flag_name, active=data['global_waffle']):
with override_flag(DEPRECATE_YOUTUBE_FLAG.name, active=data['global_waffle']):
response = self.client.post(
self.url,
json.dumps({'files': [file_data]}),