File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,16 @@ class TestParser(unittest.TestCase):
22
22
FakeValidator = fake_validator ()
23
23
24
24
def setUp (self ):
25
- self .open = mock .mock_open (read_data = '{}' )
26
- patch = mock .patch .object (cli , "open" , self .open , create = True )
27
- patch .start ()
28
- self .addCleanup (patch .stop )
25
+ mock_open = mock .mock_open ()
26
+ patch_open = mock .patch .object (cli , "open" , mock_open , create = True )
27
+ patch_open .start ()
28
+ self .addCleanup (patch_open .stop )
29
+
30
+ mock_json_load = mock .Mock ()
31
+ mock_json_load .return_value = {}
32
+ patch_json_load = mock .patch ("json.load" )
33
+ patch_json_load .start ()
34
+ self .addCleanup (patch_json_load .stop )
29
35
30
36
def test_find_validator_by_fully_qualified_object_name (self ):
31
37
arguments = cli .parse_args (
You can’t perform that action at this time.
0 commit comments