def test_initialize(): with nt.assert_raises(SystemExit): api.initialize(['-h']) api.initialize(['--configuration_backend', 'json', '--tasks_json', 'a']) tj = stolos.get_NS().tasks_json api.initialize(['--configuration_backend', 'json', '--tasks_json', 'b']) tj2 = stolos.get_NS().tasks_json nt.assert_equal(tj, 'a') nt.assert_equal(tj2, 'b') nt.assert_false(hasattr(stolos, 'Uninitialized'))
def test_tasks_json(): api.initialize(['--tasks_json', '']) with nt.assert_raises(IOError): JSONMapping()