replaced unittest assertions pytest assertions (#26524)

This commit is contained in:
Aarif
2021-02-18 18:08:23 +05:00
committed by GitHub
parent 774caac305
commit 7dfd6edd23
14 changed files with 166 additions and 188 deletions

View File

@@ -588,7 +588,7 @@ class CanonicalContentTest(SharedModuleStoreTestCase):
with check_mongo_calls(mongo_calls):
asset_path = StaticContent.get_canonicalized_asset_path(self.courses[prefix].id, start, base_url, exts)
self.assertIsNotNone(re.match(expected, asset_path))
assert re.match(expected, asset_path) is not None
@ddt.data(
# No leading slash.
@@ -784,4 +784,4 @@ class CanonicalContentTest(SharedModuleStoreTestCase):
with check_mongo_calls(mongo_calls):
asset_path = StaticContent.get_canonicalized_asset_path(self.courses[prefix].id, start, base_url, exts)
self.assertIsNotNone(re.match(expected, asset_path))
assert re.match(expected, asset_path) is not None