Update test
This commit is contained in:
parent
a5c8ca58f7
commit
885c7f5de5
|
@ -5,7 +5,6 @@ from .common import skip_screen_checks
|
||||||
from .common import ordered
|
from .common import ordered
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TestLoadScreenData(unittest.TestCase):
|
class TestLoadScreenData(unittest.TestCase):
|
||||||
"""Screen Data Json test"""
|
"""Screen Data Json test"""
|
||||||
|
|
||||||
|
@ -13,8 +12,7 @@ class TestLoadScreenData(unittest.TestCase):
|
||||||
@ordered
|
@ordered
|
||||||
def test_load_json(self):
|
def test_load_json(self):
|
||||||
"""Test to load a valid json"""
|
"""Test to load a valid json"""
|
||||||
file_name = 'screens_data.json'
|
loaded_screen_names = load_screen_json()
|
||||||
loaded_screen_names = load_screen_json(file_name)
|
|
||||||
self.assertEqual(loaded_screen_names[2], 'success')
|
self.assertEqual(loaded_screen_names[2], 'success')
|
||||||
|
|
||||||
@skip_screen_checks
|
@skip_screen_checks
|
||||||
|
@ -22,5 +20,5 @@ class TestLoadScreenData(unittest.TestCase):
|
||||||
def test_load_invalid_file(self):
|
def test_load_invalid_file(self):
|
||||||
"""Test to load an invalid json"""
|
"""Test to load an invalid json"""
|
||||||
file_name = 'invalid_screens_data.json'
|
file_name = 'invalid_screens_data.json'
|
||||||
loaded_screen_names = load_screen_json(file_name)
|
with self.assertRaises(OSError):
|
||||||
self.assertEqual(loaded_screen_names[2], 'File not found')
|
load_screen_json(file_name)
|
||||||
|
|
Reference in New Issue
Block a user