Skip to content

Commit fe1cf52

Browse files
committed
fix: Change assertion
1 parent 3c94a62 commit fe1cf52

File tree

1 file changed

+25
-31
lines changed

1 file changed

+25
-31
lines changed

tests/test_unit_tests_threaded.py

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -194,18 +194,16 @@ def setUp(self):
194194
"title": "Python Test Image",
195195
"ingredients": [],
196196
"assertions": [
197-
{'label': 'stds.schema-org.CreativeWork',
197+
{'label': 'com.unit.test',
198198
'data': {
199-
'@context': 'http://schema.org/',
200-
'@type': 'CreativeWork',
201199
'author': [
202-
{'@type': 'Person',
200+
{
203201
'name': 'Tester'
204-
}
202+
}
205203
]
206204
},
207205
'kind': 'Json'
208-
}
206+
}
209207
]
210208
}
211209

@@ -219,18 +217,16 @@ def setUp(self):
219217
"title": "Python Test Image 1",
220218
"ingredients": [],
221219
"assertions": [
222-
{'label': 'stds.schema-org.CreativeWork',
220+
{'label': 'com.unit.test',
223221
'data': {
224-
'@context': 'http://schema.org/',
225-
'@type': 'CreativeWork',
226222
'author': [
227-
{'@type': 'Person',
223+
{
228224
'name': 'Tester One'
229-
}
225+
}
230226
]
231227
},
232228
'kind': 'Json'
233-
}
229+
}
234230
]
235231
}
236232

@@ -244,18 +240,16 @@ def setUp(self):
244240
"title": "Python Test Image 2",
245241
"ingredients": [],
246242
"assertions": [
247-
{'label': 'stds.schema-org.CreativeWork',
243+
{'label': 'com.unit.test',
248244
'data': {
249-
'@context': 'http://schema.org/',
250-
'@type': 'CreativeWork',
251245
'author': [
252-
{'@type': 'Person',
246+
{
253247
'name': 'Tester Two'
254-
}
248+
}
255249
]
256250
},
257251
'kind': 'Json'
258-
}
252+
}
259253
]
260254
}
261255

@@ -331,7 +325,7 @@ def sign_file(filename, thread_id):
331325
# Verify the author is correct
332326
assertions = active_manifest["assertions"]
333327
for assertion in assertions:
334-
if assertion["label"] == "stds.schema-org.CreativeWork":
328+
if assertion["label"] == "com.unit.test":
335329
author_name = assertion["data"]["author"][0]["name"]
336330
self.assertEqual(author_name, expected_author)
337331
break
@@ -446,7 +440,7 @@ async def async_sign_file(filename, thread_id):
446440
# Verify the author is correct
447441
assertions = active_manifest["assertions"]
448442
for assertion in assertions:
449-
if assertion["label"] == "stds.schema-org.CreativeWork":
443+
if assertion["label"] == "com.unit.test":
450444
author_name = assertion["data"]["author"][0]["name"]
451445
self.assertEqual(author_name, expected_author)
452446
break
@@ -518,7 +512,7 @@ def write_manifest(manifest_def, output_stream, thread_id):
518512
# Verify the author is correct
519513
assertions = active_manifest["assertions"]
520514
for assertion in assertions:
521-
if assertion["label"] == "stds.schema-org.CreativeWork":
515+
if assertion["label"] == "com.unit.test":
522516
author_name = assertion["data"]["author"][0]["name"]
523517
self.assertEqual(
524518
author_name, f"Tester {
@@ -675,7 +669,7 @@ def sign_file(filename, thread_id):
675669
# Verify the author is correct
676670
assertions = active_manifest["assertions"]
677671
for assertion in assertions:
678-
if assertion["label"] == "stds.schema-org.CreativeWork":
672+
if assertion["label"] == "com.unit.test":
679673
author_name = assertion["data"]["author"][0]["name"]
680674
self.assertEqual(author_name, expected_author)
681675
break
@@ -775,7 +769,7 @@ def read_manifest():
775769
# Verify the author is correct
776770
assertions = active_manifest["assertions"]
777771
for assertion in assertions:
778-
if assertion["label"] == "stds.schema-org.CreativeWork":
772+
if assertion["label"] == "com.unit.test":
779773
author_name = assertion["data"]["author"][0]["name"]
780774
self.assertEqual(author_name, "Tester One")
781775
break
@@ -853,7 +847,7 @@ def read_manifest(reader_id):
853847
# Verify the author is correct
854848
assertions = active_manifest["assertions"]
855849
for assertion in assertions:
856-
if assertion["label"] == "stds.schema-org.CreativeWork":
850+
if assertion["label"] == "com.unit.test":
857851
author_name = assertion["data"]["author"][0]["name"]
858852
self.assertEqual(author_name, "Tester One")
859853
break
@@ -935,7 +929,7 @@ def read_manifest(reader_id):
935929
# Verify the author is correct
936930
assertions = active_manifest["assertions"]
937931
for assertion in assertions:
938-
if assertion["label"] == "stds.schema-org.CreativeWork":
932+
if assertion["label"] == "com.unit.test":
939933
author_name = assertion["data"]["author"][0]["name"]
940934
self.assertEqual(author_name, "Tester One")
941935
break
@@ -1023,7 +1017,7 @@ def read_manifest(reader_id):
10231017
# Verify the author is correct
10241018
assertions = active_manifest["assertions"]
10251019
for assertion in assertions:
1026-
if assertion["label"] == "stds.schema-org.CreativeWork":
1020+
if assertion["label"] == "com.unit.test":
10271021
author_name = assertion["data"]["author"][0]["name"]
10281022
self.assertEqual(author_name, "Tester One")
10291023
break
@@ -1104,7 +1098,7 @@ def remote_sign(output_stream, manifest_def, thread_id):
11041098
# Verify the author is correct
11051099
assertions = active_manifest["assertions"]
11061100
for assertion in assertions:
1107-
if assertion["label"] == "stds.schema-org.CreativeWork":
1101+
if assertion["label"] == "com.unit.test":
11081102
author_name = assertion["data"]["author"][0]["name"]
11091103
self.assertEqual(author_name, expected_author)
11101104
break
@@ -1209,7 +1203,7 @@ def archive_sign(
12091203
# Verify the author is correct
12101204
assertions = active_manifest["assertions"]
12111205
for assertion in assertions:
1212-
if assertion["label"] == "stds.schema-org.CreativeWork":
1206+
if assertion["label"] == "com.unit.test":
12131207
author_name = assertion["data"]["author"][0]["name"]
12141208
self.assertEqual(author_name, expected_author)
12151209
break
@@ -1313,7 +1307,7 @@ def sign_file(output_stream, manifest_def, thread_id):
13131307
# Verify the author is correct
13141308
assertions = active_manifest["assertions"]
13151309
for assertion in assertions:
1316-
if assertion["label"] == "stds.schema-org.CreativeWork":
1310+
if assertion["label"] == "com.unit.test":
13171311
author_name = assertion["data"]["author"][0]["name"]
13181312
self.assertEqual(author_name, expected_author)
13191313
break
@@ -1442,7 +1436,7 @@ async def read_manifest():
14421436
assertions = active_manifest["assertions"]
14431437
author_found = False
14441438
for assertion in assertions:
1445-
if assertion["label"] == "stds.schema-org.CreativeWork":
1439+
if assertion["label"] == "com.unit.test":
14461440
author_name = assertion["data"]["author"][0]["name"]
14471441
self.assertEqual(author_name, "Tester One")
14481442
author_found = True
@@ -1525,7 +1519,7 @@ async def read_manifest(reader_id):
15251519
# Verify the author is correct
15261520
assertions = active_manifest["assertions"]
15271521
for assertion in assertions:
1528-
if assertion["label"] == "stds.schema-org.CreativeWork":
1522+
if assertion["label"] == "com.unit.test":
15291523
author_name = assertion["data"]["author"][0]["name"]
15301524
self.assertEqual(author_name, "Tester One")
15311525
break

0 commit comments

Comments
 (0)