Skip to content

Commit

Permalink
chore: udpate test
Browse files Browse the repository at this point in the history
  • Loading branch information
leangseu-edx committed Sep 15, 2023
1 parent 958efa7 commit 291c87b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion openassessment/xblock/test/test_load_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,17 @@ def test_get_url_with_custom_static_url(self):
def test_is_dev_server_url(self, resource_string):
resource_string.return_value = None
key_url = 'some_url.js'
print(LoadStatic._manifest)
with patch('json.loads') as jsondata:
jsondata.return_value = {
manifest = {
'some_url.js': 'some_url.hash.js',
'is_dev_server': True
}
jsondata.return_value = manifest
self.assertEqual(LoadStatic._is_loaded, False)
self.assertEqual(LoadStatic.get_url(key_url), 'some_url.hash.js')
self.assertEqual(LoadStatic._manifest, manifest)
self.assertEqual(LoadStatic._is_loaded, True)
self.assertEqual(LoadStatic.get_is_dev_server(), True)

@patch('pkg_resources.resource_string')
Expand Down

0 comments on commit 291c87b

Please sign in to comment.