From 885c7f5de5c6d16c4057148564afec422d2a059e Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Fri, 19 Aug 2022 16:41:52 +0530 Subject: [PATCH] Update test --- src/bitmessagekivy/tests/test_load_screen_data_file.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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)