示例#1
0
 def test_not_two_letter_state(self):
     city = "Auburn"
     state = "Alabama"
     zip = "36830"
     expected = False
     actual = valid_city_state_zip(city, state, zip)
     self.assertIs(expected, actual)
示例#2
0
 def test_empty_zip(self):
     city = "Auburn"
     state = "AL"
     zip = ""
     expected = False
     actual = valid_city_state_zip(city, state, zip)
     self.assertIs(expected, actual)
示例#3
0
 def test_invalid_zip(self):
     city = "Auburn"
     state = "AL"
     zip = "alksdfj,xcmnvopweihrlskdjfn12345678654"
     expected = False
     actual = valid_city_state_zip(city, state, zip)
     self.assertIs(expected, actual)
示例#4
0
 def test_wrongcity_wrongstate_wrongzip(self):
     city = "Auburn"
     state = "CO"
     zip = "36830"
     expected = False
     actual = valid_city_state_zip(city, state, zip)
     self.assertIs(expected, actual)
示例#5
0
 def test_wrongcity_wrongstate_goodzip(self):
     city = "Birmingham"
     state = "CO"
     zip = "36830"
     expected = False
     actual = valid_city_state_zip(city, state, zip)
     self.assertIs(expected, actual)
示例#6
0
 def test_wrongcity_goodstate_wrongzip(self):
     city = "Birmingham"
     state = "AL"
     zip = "32845"
     expected = False
     actual = valid_city_state_zip(city, state, zip)
     self.assertIs(expected, actual)
示例#7
0
 def test_goodcity_goodstate_wrongzip(self):
     city = "Auburn"
     state = "AL"
     zip = "35004"
     expected = False
     actual = valid_city_state_zip(city, state, zip)
     self.assertIs(expected, actual)
示例#8
0
 def test_good_city_state_zip(self):
     city = "Auburn"
     state = "AL"
     zip = "36830"
     expected = True
     actual = valid_city_state_zip(city, state, zip)
     self.assertIs(expected, actual)