Skip to content

Commit

Permalink
Use clean() only for tests
Browse files Browse the repository at this point in the history
When using full_clean(), every field is tested including fields ommitted
for test simplicity. Build shouldn't fail now.
  • Loading branch information
Izidor Matušov committed Jul 15, 2013
1 parent 770de45 commit 1a87ae4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/address_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ def test_city_is_alias_of_line4(self):
def assert_valid_postcode(country_value, postcode_value):
country = Country(iso_3166_1_a2=country_value)
address = UserAddress(country=country, postcode=postcode_value)
address.full_clean()
address.clean()


@raises(exceptions.ValidationError)
def assert_invalid_postcode(country_value, postcode_value):
country = Country(iso_3166_1_a2=country_value)
address = UserAddress(country=country, postcode=postcode_value)
address.full_clean()
address.clean()


def test_postcode_is_validated_for_country():
Expand Down

0 comments on commit 1a87ae4

Please sign in to comment.