Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dchhabda committed Dec 20, 2024
1 parent 36e26d1 commit ddb449c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -10386,9 +10386,17 @@ def test_generate_checksum_public_data(self):
project=project,
info={"a": 1, "b": 2, "c": 3}
)
# confirm task payload populated with checksum generated
task.dup_checksum == expected_checksum
checksum = generate_checksum(task)
assert checksum == expected_checksum

# project w/o duplicate checksum configured gets
# tasks created with null checksum value
project2 = ProjectFactory.create(owner=subadmin, info={"x": 123}, short_name="xyz")
task2 = TaskFactory.create(project=project2, info={"a": 1, "b": 2, "c": 3})
assert task2.dup_checksum == None

@with_context
@patch("pybossa.task_creator_helper.get_encryption_key")
@patch("pybossa.task_creator_helper.read_encrypted_file")
Expand Down

0 comments on commit ddb449c

Please sign in to comment.