예제 #1
0
파일: test_query.py 프로젝트: 01-/grano
 def test_property_filter_none(self):
     name = 'Banana'
     res = query({'properties': {'name': name}}).to_dict()
     assert 'properties' in res, res
     assert res['id'] is None, res
     assert res['properties'] is not None, res
     assert res['properties']['name'] is not None, res
예제 #2
0
 def test_property_filter(self):
     name = 'BBC'
     res = query({'properties': {'name': name}}).to_dict()
     assert 'properties' in res, res
     assert res['properties'] is not None, res
     assert res['properties']['name'] is not None, res
     assert res['properties']['name']['value'] == name, res
예제 #3
0
 def test_property_nested(self):
     res = query({'properties': {'name': None}}).to_dict()
     assert 'properties' in res, res
     assert res['properties'] is not None, res
     assert res['properties']['name'] is not None, res
     assert res['properties']['name']['source_url'] is not None, res
     assert res['properties']['name']['value'] is not None, res
예제 #4
0
 def test_property_filter_none(self):
     name = 'Banana'
     res = query({'properties': {'name': name}}).to_dict()
     assert 'properties' in res, res
     assert res['id'] is None, res
     assert res['properties'] is not None, res
     assert res['properties']['name'] is not None, res
예제 #5
0
파일: test_query.py 프로젝트: 01-/grano
 def test_property_nested(self):
     res = query({'properties': {'name': None}}).to_dict()
     assert 'properties' in res, res
     assert res['properties'] is not None, res
     assert res['properties']['name'] is not None, res
     assert res['properties']['name']['source_url'] is not None, res
     assert res['properties']['name']['value'] is not None, res
예제 #6
0
파일: test_query.py 프로젝트: 01-/grano
 def test_property_filter(self):
     name = 'BBC'
     res = query({'properties': {'name': name}}).to_dict()
     assert 'properties' in res, res
     assert res['properties'] is not None, res
     assert res['properties']['name'] is not None, res
     assert res['properties']['name']['value'] == name, res
예제 #7
0
 def test_schema_filter(self):
     res = query({'schemata': 'fellow'}).to_dict()
     assert 'schemata' in res, res
     assert res['schemata'] is not None, res
     assert res['schemata']['name'] == 'fellow', res
예제 #8
0
 def test_schema_nested(self):
     res = query({'schemata': None}).to_dict()
     assert 'schemata' in res, res
     assert res['schemata'] is not None, res
     assert res['schemata']['name'] is not None, res
예제 #9
0
 def test_author_filter(self):
     res = query({'author': {'login': '******'}}).to_dict()
     assert 'author' in res, res
     assert res['author'] is not None, res
     assert res['author']['login'] == '_system', res
예제 #10
0
 def test_author_nested(self):
     res = query({'author': None}).to_dict()
     assert 'author' in res, res
     assert res['author'] is not None, res
     assert res['author']['login'] is not None, res
예제 #11
0
 def test_default_fields(self):
     res = query({'*': None}).to_dict()
     assert 'id' in res, res
     assert res['id'] is not None, res
     assert res['status'] is not None, res
예제 #12
0
 def test_list_entity_id(self):
     res = query([{'id': None}]).to_dict()
     assert len(res), res
     assert 'id' in res[0], res
     assert res[0]['id'] is not None, res
예제 #13
0
파일: test_query.py 프로젝트: 01-/grano
 def test_list_entity_id(self):
     res = query([{'id': None}]).to_dict()
     assert len(res), res
     assert 'id' in res[0], res
     assert res[0]['id'] is not None, res
예제 #14
0
파일: test_query.py 프로젝트: 01-/grano
 def test_author_nested(self):
     res = query({'author': None}).to_dict()
     assert 'author' in res, res
     assert res['author'] is not None, res
     assert res['author']['login'] is not None, res
예제 #15
0
 def test_project_nested(self):
     res = query({'project': None}).to_dict()
     assert 'project' in res, res
     assert res['project'] is not None, res
     assert res['project']['slug'] is not None, res
     assert PARENT_ID not in res['project'], res
예제 #16
0
파일: test_query.py 프로젝트: 01-/grano
 def test_nested_relation_inbound_source(self):
     res = query({'inbound': {'id': None, 'source': None}}).to_dict()
     assert 'inbound' in res, res
     assert res['inbound'] is not None, res
     assert res['inbound']['id'] is not None, res
     assert res['inbound']['source']['id'] is not None, res
예제 #17
0
파일: test_query.py 프로젝트: 01-/grano
 def test_project_nested(self):
     res = query({'project': None}).to_dict()
     assert 'project' in res, res
     assert res['project'] is not None, res
     assert res['project']['slug'] is not None, res
     assert PARENT_ID not in res['project'], res
예제 #18
0
파일: test_query.py 프로젝트: 01-/grano
 def test_schema_filter(self):
     res = query({'schemata': 'fellow'}).to_dict()
     assert 'schemata' in res, res
     assert res['schemata'] is not None, res
     assert res['schemata']['name'] == 'fellow', res
예제 #19
0
파일: test_query.py 프로젝트: 01-/grano
 def test_schema_nested(self):
     res = query({'schemata': None}).to_dict()
     assert 'schemata' in res, res
     assert res['schemata'] is not None, res
     assert res['schemata']['name'] is not None, res
예제 #20
0
파일: test_query.py 프로젝트: 01-/grano
 def test_author_filter(self):
     res = query({'author': {'login': '******'}}).to_dict()
     assert 'author' in res, res
     assert res['author'] is not None, res
     assert res['author']['login'] == '_system', res
예제 #21
0
 def test_nested_relation_inbound_source(self):
     res = query({'inbound': {'id': None, 'source': None}}).to_dict()
     assert 'inbound' in res, res
     assert res['inbound'] is not None, res
     assert res['inbound']['id'] is not None, res
     assert res['inbound']['source']['id'] is not None, res
예제 #22
0
파일: test_query.py 프로젝트: 01-/grano
 def test_default_fields(self):
     res = query({'*': None}).to_dict()
     assert 'id' in res, res
     assert res['id'] is not None, res
     assert res['status'] is not None, res
예제 #23
0
파일: test_query.py 프로젝트: 01-/grano
 def test_property_all(self):
     res = query({'properties': {'*': None}}).to_dict()
     assert 'properties' in res, res
     assert res['properties'] is not None, res
     assert '*' not in res['properties'], res
     assert res['properties']['name'] is not None, res
예제 #24
0
 def test_single_entity_id(self):
     res = query({'id': None}).to_dict()
     assert 'id' in res, res
     assert res['id'] is not None, res
예제 #25
0
 def test_property_all(self):
     res = query({'properties': {'*': None}}).to_dict()
     assert 'properties' in res, res
     assert res['properties'] is not None, res
     assert '*' not in res['properties'], res
     assert res['properties']['name'] is not None, res
예제 #26
0
파일: test_query.py 프로젝트: 01-/grano
 def test_single_entity_id(self):
     res = query({'id': None}).to_dict()
     assert 'id' in res, res
     assert res['id'] is not None, res