diff --git a/src/bitmessagekivy/tests/test_load_screen_data_file.py b/src/bitmessagekivy/tests/test_load_screen_data_file.py index 4148c05f..7f394a02 100644 --- a/src/bitmessagekivy/tests/test_load_screen_data_file.py +++ b/src/bitmessagekivy/tests/test_load_screen_data_file.py @@ -5,7 +5,6 @@ from .common import skip_screen_checks from .common import ordered - class TestLoadScreenData(unittest.TestCase): """Screen Data Json test""" @@ -13,8 +12,7 @@ class TestLoadScreenData(unittest.TestCase): @ordered def test_load_json(self): """Test to load a valid json""" - file_name = 'screens_data.json' - loaded_screen_names = load_screen_json(file_name) + loaded_screen_names = load_screen_json() self.assertEqual(loaded_screen_names[2], 'success') @skip_screen_checks @@ -22,5 +20,5 @@ class TestLoadScreenData(unittest.TestCase): def test_load_invalid_file(self): """Test to load an invalid json""" file_name = 'invalid_screens_data.json' - loaded_screen_names = load_screen_json(file_name) - self.assertEqual(loaded_screen_names[2], 'File not found') + with self.assertRaises(OSError): + load_screen_json(file_name)