Example #1
0
def test_address_lines_for_mailing():
    info = OnboardingInfo()
    assert info.address_lines_for_mailing == []

    info.address = "150 Boop Way"
    assert info.address_lines_for_mailing == ["150 Boop Way"]

    info.apt_number = "2"
    assert info.address_lines_for_mailing == ["150 Boop Way", "Apartment 2"]

    info.borough = "MANHATTAN"
    info.state = "NY"
    assert info.address_lines_for_mailing == [
        "150 Boop Way", "Apartment 2", "New York, NY"
    ]

    info.zipcode = "11201"
    assert info.address_lines_for_mailing == [
        "150 Boop Way", "Apartment 2", "New York, NY 11201"
    ]

    info.borough = ""
    info.non_nyc_city = "Beetville"
    info.state = "OH"
    info.zipcode = "43210"
    assert info.address_lines_for_mailing == [
        "150 Boop Way", "Apartment 2", "Beetville, OH 43210"
    ]
Example #2
0
def test_full_address_works():
    info = OnboardingInfo()
    assert info.full_address == ''

    info.borough = 'STATEN_ISLAND'
    assert info.full_address == ''

    info.address = '123 Boop street'
    assert info.full_address == '123 Boop street, Staten Island'
Example #3
0
def test_full_nyc_address_works():
    info = OnboardingInfo()
    assert info.full_nyc_address == ""

    info.borough = "STATEN_ISLAND"
    assert info.full_nyc_address == ""

    info.address = "123 Boop street"
    assert info.full_nyc_address == "123 Boop street, Staten Island"
Example #4
0
def test_address_lines_for_mailing():
    info = OnboardingInfo()
    assert info.address_lines_for_mailing == []

    info.address = "150 Boop Way"
    assert info.address_lines_for_mailing == ["150 Boop Way"]

    info.apt_number = "2"
    assert info.address_lines_for_mailing == ["150 Boop Way", "Apartment 2"]

    info.borough = "MANHATTAN"
    assert info.address_lines_for_mailing == [
        "150 Boop Way", "Apartment 2", "New York, NY"
    ]

    info.zipcode = "11201"
    assert info.address_lines_for_mailing == [
        "150 Boop Way", "Apartment 2", "New York, NY 11201"
    ]