def test_store_with_wrong_path_fails(self): data = Query.QueryHDX(query='ebola', test=True) result = Parse.ParseHDXQuery(data=data, fields=['name', 'title']) assert Store.StoreCSV(data=result, file_name='foo/bar.csv')['success'] == False
def test_store_with_right_data_works(self): data = Query.QueryHDX(query='ebola', test=True) result = Parse.ParseHDXQuery(data=data, fields=['name', 'title']) assert Store.StoreCSV(data=result)['success'] == True
def test_query_without_parameter_returns_false(self): assert Query.QueryHDX(query=None, test=True) == False
def test_query_with_parameter_returns_dict(self): data = Query.QueryHDX(query='ebola', test=True) assert type(data) is dict
def test_parser_with_data_returns_a_dict(self): data = Query.QueryHDX(query='ebola') result = Parse.ParseHDXQuery(data=data, fields=['name', 'title']) assert type(result) is list