Skip to content

Commit 6b0ca5b

Browse files
committed
Testing uuids to make sure they are in-sync across Orient/SQL
1 parent b1a7509 commit 6b0ca5b

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

graphql_compiler/tests/integration_tests/test_backends_integration.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,15 @@ def test_simple_output(self, backend_name):
8888
{
8989
Animal {
9090
name @output(out_name: "animal_name")
91+
uuid @output(out_name: "animal_uuid")
9192
}
9293
}
9394
'''
9495
expected_results = [
95-
{'animal_name': 'Animal 1'},
96-
{'animal_name': 'Animal 2'},
97-
{'animal_name': 'Animal 3'},
98-
{'animal_name': 'Animal 4'},
96+
{'animal_name': 'Animal 1', 'animal_uuid': 'cfc6e625-8594-0927-468f-f53d864a7a51'},
97+
{'animal_name': 'Animal 2', 'animal_uuid': 'cfc6e625-8594-0927-468f-f53d864a7a52'},
98+
{'animal_name': 'Animal 3', 'animal_uuid': 'cfc6e625-8594-0927-468f-f53d864a7a53'},
99+
{'animal_name': 'Animal 4', 'animal_uuid': 'cfc6e625-8594-0927-468f-f53d864a7a54'},
99100
]
100101
self.assertResultsEqual(graphql_query, {}, backend_name, expected_results)
101102

graphql_compiler/tests/test_data_tools/data_tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,25 +86,25 @@ def generate_sql_integration_data(sql_test_backends):
8686
table_name_to_table, metadata = get_animal_schema_sql_metadata()
8787
animal_rows = (
8888
(
89-
'cfc6e625-8594-0927-468f-f53d864a7a50',
89+
'cfc6e625-8594-0927-468f-f53d864a7a51',
9090
'Animal 1',
9191
Decimal('100'),
9292
datetime.date(1900, 1, 1),
9393
),
9494
(
95-
'cfc6e625-8594-0927-468f-f53d864a7a51',
95+
'cfc6e625-8594-0927-468f-f53d864a7a52',
9696
'Animal 2',
9797
Decimal('200'),
9898
datetime.date(1950, 2, 2),
9999
),
100100
(
101-
'cfc6e625-8594-0927-468f-f53d864a7a52',
101+
'cfc6e625-8594-0927-468f-f53d864a7a53',
102102
'Animal 3',
103103
Decimal('300'),
104104
datetime.date(1975, 3, 3),
105105
),
106106
(
107-
'cfc6e625-8594-0927-468f-f53d864a7a53',
107+
'cfc6e625-8594-0927-468f-f53d864a7a54',
108108
'Animal 4',
109109
Decimal('400'),
110110
datetime.date(2000, 4, 4),
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright 2018-present Kensho Technologies, LLC.
2-
create vertex Animal set name = 'Animal 1', net_worth = Decimal('100'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a50'
3-
create vertex Animal set name = 'Animal 2', net_worth = Decimal('200'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a51'
4-
create vertex Animal set name = 'Animal 3', net_worth = Decimal('300'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a52'
5-
create vertex Animal set name = 'Animal 4', net_worth = Decimal('400'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a53'
2+
create vertex Animal set name = 'Animal 1', net_worth = Decimal('100'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a51'
3+
create vertex Animal set name = 'Animal 2', net_worth = Decimal('200'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a52'
4+
create vertex Animal set name = 'Animal 3', net_worth = Decimal('300'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a53'
5+
create vertex Animal set name = 'Animal 4', net_worth = Decimal('400'), uuid = 'cfc6e625-8594-0927-468f-f53d864a7a54'

0 commit comments

Comments
 (0)