Ejemplo n.º 1
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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 5
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
Ejemplo n.º 6
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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 13
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
Ejemplo n.º 14
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
Ejemplo n.º 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
Ejemplo n.º 16
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
Ejemplo n.º 17
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
Ejemplo n.º 18
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
Ejemplo n.º 19
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
Ejemplo n.º 20
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
Ejemplo n.º 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
Ejemplo n.º 22
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
Ejemplo n.º 23
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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 26
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