def test_load_json_source_dict(self): source = { 'this': 'that', 'other': ['thing'] } self.assertTrue(utilities.load_json_source(source))
def test_load_json_source_path(self): source = os.path.join(self.data_dir, 'schema_valid_full.json') self.assertTrue(utilities.load_json_source(source))
def test_load_json_source_string(self): source = os.path.join(self.data_dir, 'schema_valid_full.json') with io.open(source, mode='r+t', encoding='utf-8') as stream: source = stream.read() self.assertTrue(utilities.load_json_source(source))
def test_load_json_source_url(self): source = '{0}{1}'.format(self.remote_dir, 'schema_valid_full.json') self.assertTrue(utilities.load_json_source(source))