Skip to content

Commit

Permalink
chore: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
leangseu-edx committed Sep 19, 2023
1 parent 06a84aa commit 399554e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions openassessment/xblock/test/test_load_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
class TestLoadStatic(TestCase):
"""Test load static class"""

def setUp(self):
LoadStatic._manifest = {} # pylint: disable=protected-access
LoadStatic._is_loaded = False # pylint: disable=protected-access
LoadStatic._is_dev_server = False # pylint: disable=protected-access
return super().setUp()

def test_urljoin(self):
expected_result_1 = 'path_1/path_2'
expected_result_2 = 'path_1/path_2/'
Expand Down Expand Up @@ -52,9 +46,9 @@ def test_get_url_with_custom_static_url(self):
self.assertEqual(LoadStatic.get_url(key_url), urljoin('/cms', 'dist', key_url))

@patch('pkg_resources.resource_string')
@patch.object(LoadStatic, '_is_loaded', False)
def test_is_dev_server_url(self, resource_string):
# some unknown bug in python mock, need to call setUp() again
self.setUp()
resource_string.return_value = None
key_url = 'some_url.js'
with patch('json.loads') as jsondata:
Expand Down

0 comments on commit 399554e

Please sign in to comment.