Skip to content

Commit

Permalink
atom not remving the head/main merge issues correctly? cleaning up ma…
Browse files Browse the repository at this point in the history
…nually.
  • Loading branch information
mike-gangl committed May 19, 2022
1 parent 3576e05 commit 94a6fca
Showing 1 changed file with 0 additions and 74 deletions.
74 changes: 0 additions & 74 deletions tests/test_subscriber_matching_checksums.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from subscriber.podaac_access import checksum_does_match

<<<<<<< HEAD

def test_checksum_does_match__positive_match_md5(tmpdir):
output_path = str(tmpdir) + '/tmp.nc'
checksums = {
Expand Down Expand Up @@ -72,75 +70,3 @@ def test_checksum_does_match__with_no_checksum(tmpdir):
f.write("This is a temporary test file\n")

assert not checksum_does_match(output_path, checksums)
=======
def test_checksum_does_match__positive_match_md5(tmpdir):
output_path = str(tmpdir) + '/tmp.nc'
checksums = {
"tmp.nc": {
"Value": "f83f9ad1718d9b95220ddd6b18dbcecf",
"Algorithm": "MD5"
}
}

with open(output_path, 'w') as f:
f.write("This is a temporary test file\n")

assert checksum_does_match(output_path, checksums)


def test_checksum_does_match__negative_match_md5(tmpdir):
output_path = str(tmpdir) + '/tmp.nc'
checksums = {
"tmp.nc": {
"Value": "f83f9ad1718d9b95220ddd6b18dbcecf",
"Algorithm": "MD5"
}
}

with open(output_path, 'w') as f:
f.write("This is a different temporary test file\n")

assert not checksum_does_match(output_path, checksums)


def test_checksum_does_match__positive_match_sha512(tmpdir):
output_path = str(tmpdir) + '/tmp.nc'
checksums = {
"tmp.nc": {
"Value": "3f5bda96115a5d8fcbcbd71bc28ade2de24bba5f48ce485012f933c877d279d78be3ad028f69af620325a010ce34bd19be78c8b6bf083b0d523165ede8669483",
"Algorithm": "SHA512"
}
}

with open(output_path, 'w') as f:
f.write("This is a temporary test file\n")

assert checksum_does_match(output_path, checksums)


def test_checksum_does_match__negative_match_sha512(tmpdir):
output_path = str(tmpdir) + '/tmp.nc'
checksums = {
"tmp.nc": {
"Value": "3f5bda96115a5d8fcbcbd71bc28ade2de24bba5f48ce485012f933c877d279d78be3ad028f69af620325a010ce34bd19be78c8b6bf083b0d523165ede8669483",
"Algorithm": "SHA512"
}
}

with open(output_path, 'w') as f:
f.write("This is a different temporary test file\n")

assert not checksum_does_match(output_path, checksums)


def test_checksum_does_match__with_no_checksum(tmpdir):
output_path = str(tmpdir) + '/tmp.nc'
checksums = {
"tmp.nc": None
}

with open(output_path, 'w') as f:
f.write("This is a temporary test file\n")

assert not checksum_does_match(output_path, checksums)
>>>>>>> main

0 comments on commit 94a6fca

Please sign in to comment.