From 399554e359bf3039d1a8425b988f170dbbeb4a0b Mon Sep 17 00:00:00 2001 From: Leangseu Kim Date: Tue, 19 Sep 2023 10:02:43 -0400 Subject: [PATCH] chore: update test --- openassessment/xblock/test/test_load_static.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/openassessment/xblock/test/test_load_static.py b/openassessment/xblock/test/test_load_static.py index dfa11da1e8..6471ff9241 100644 --- a/openassessment/xblock/test/test_load_static.py +++ b/openassessment/xblock/test/test_load_static.py @@ -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/' @@ -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: