Skip to content

Commit

Permalink
Test address hash with non-default domain
Browse files Browse the repository at this point in the history
Hash should be the address and domain included
  • Loading branch information
say-yawn committed Aug 12, 2021
1 parent 42f78f7 commit c7ac965
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions emails/tests/models_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ def test_address_hash_with_subdomain(self):
expected_hash = sha256(f'{address}@{subdomain}'.encode('utf-8')).hexdigest()
assert address_hash(address, subdomain) == expected_hash

def test_address_hash_with_additional_domain(self):
address = 'aaaaaaaaa'
test_domain = 'test.com'
expected_hash = sha256(f'{address}@{test_domain}'.encode('utf-8')).hexdigest()
assert address_hash(address, domain=test_domain) == expected_hash


class RelayAddressTest(TestCase):
def setUp(self):
Expand Down

0 comments on commit c7ac965

Please sign in to comment.