def test_it_works(self, db):
     cmd = verify_addresses.Command()
     CountyFactory(name="Bronx")
     oi = self.make_national_nyc_onboarding_info()
     assert cmd.convert_national_to_nyc_addr_if_needed(oi) is True
     assert oi.borough == "BRONX"
     assert oi.non_nyc_city == ""
     oi.full_clean()
     oi.save()
示例#2
0
def make_cmd():
    return verify_addresses.Command(stdout=StringIO())
 def test_it_does_nothing_if_not_in_nyc_borough(self, db):
     cmd = verify_addresses.Command()
     CountyFactory(name="Erie")
     oi = self.make_national_nyc_onboarding_info()
     assert cmd.convert_national_to_nyc_addr_if_needed(oi) is False
 def test_it_does_nothing_if_already_in_nyc(self, db):
     cmd = verify_addresses.Command()
     oi = OnboardingInfoFactory()
     assert cmd.convert_national_to_nyc_addr_if_needed(oi) is False