Skip to content

Commit

Permalink
Move test_valid_address_dupe_domain_address_of_deleted_is_not_valid
Browse files Browse the repository at this point in the history
  • Loading branch information
say-yawn committed Jan 12, 2024
1 parent 4bf46f1 commit f0de410
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions emails/tests/models_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,6 @@ def test_valid_address_pattern_is_not_valid(self):
assert not valid_address_pattern("foo bar")
assert not valid_address_pattern("Foo")

@override_flag("custom_domain_management_redesign", active=True)
def test_valid_address_dupe_domain_address_of_deleted_is_not_valid(self):
user = make_premium_test_user()
user_profile = user.profile
user_profile.subdomain = "test"
user_profile.save()
address = "same-address"
domain_address = DomainAddress.make_domain_address(
user_profile, address=address
)
domain_address.delete()
assert not valid_address(
address, domain_address.domain_value, user_profile.subdomain
)


class RelayAddressTest(TestCase):
def setUp(self):
Expand Down Expand Up @@ -1144,6 +1129,17 @@ def test_make_domain_address_can_make_dupe_of_deleted(self):
)
assert dupe_domain_address.full_address == domain_address.full_address

@override_flag("custom_domain_management_redesign", active=True)
def test_valid_address_dupe_domain_address_of_deleted_is_not_valid(self):
address = "same-address"
domain_address = DomainAddress.make_domain_address(
self.user_profile, address=address
)
domain_address.delete()
assert not valid_address(
address, domain_address.domain_value, self.user_profile.subdomain
)

@override_flag("custom_domain_management_redesign", active=True)
def test_make_domain_address_cannot_make_dupe_of_deleted(self):
address = "same-address"
Expand Down

0 comments on commit f0de410

Please sign in to comment.