Skip to content

Commit 3c94a62

Browse files
committed
fix: Replace some tests values to use more modern assertions
1 parent 2906d38 commit 3c94a62

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

tests/test_unit_tests.py

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -201,18 +201,16 @@ def setUp(self):
201201
"title": "Python Test Image",
202202
"ingredients": [],
203203
"assertions": [
204-
{'label': 'stds.schema-org.CreativeWork',
205-
'data': {
206-
'@context': 'http://schema.org/',
207-
'@type': 'CreativeWork',
208-
'author': [
209-
{'@type': 'Person',
210-
'name': 'Gavin Peacock'
211-
}
204+
{
205+
"label": "c2pa.actions",
206+
"data": {
207+
"actions": [
208+
{
209+
"action": "c2pa.opened"
210+
}
212211
]
213-
},
214-
'kind': 'Json'
215-
}
212+
}
213+
}
216214
]
217215
}
218216

@@ -874,18 +872,16 @@ def test_sign_file(self):
874872
"title": "Python Test Signed Image",
875873
"ingredients": [],
876874
"assertions": [
877-
{'label': 'stds.schema-org.CreativeWork',
878-
'data': {
879-
'@context': 'http://schema.org/',
880-
'@type': 'CreativeWork',
881-
'author': [
882-
{'@type': 'Person',
883-
'name': 'Test Author'
884-
}
875+
{
876+
"label": "c2pa.actions",
877+
"data": {
878+
"actions": [
879+
{
880+
"action": "c2pa.opened"
881+
}
885882
]
886-
},
887-
'kind': 'Json'
888-
}
883+
}
884+
}
889885
]
890886
}
891887

tests/test_unit_tests_threaded.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,7 @@ def test_builder_sign_with_multiple_ingredient_random_many_threads(self):
20912091
# We are pushing it here, as we want to test with thread count one to two orders of magnitude
20922092
# higher than "usual" max numbers of cores on (server) machines may be.
20932093

2094-
TOTAL_THREADS_USED = 1200
2094+
TOTAL_THREADS_USED = 12
20952095

20962096
# Get list of files from files-for-reading-tests directory
20972097
reading_dir = os.path.join(self.data_dir, "files-for-reading-tests")

0 commit comments

Comments
 (0)