コード例 #1
0
 def __init__(self):
     self.gallons_requested = None
     self.username = None
     self.delivery_addr = street_address()
     self.delivery_date = None
     self.price_per_gallon = None
     self.total_cost = None
コード例 #2
0
def test_street_address_city_len_cannot_be_greater_than_100():
    addr = profile.street_address()

    letters = string.ascii_lowercase
    addr.city = ''.join(random.choice(letters) for i in range(1000))

    assert len(addr.city) == 100
コード例 #3
0
def test_street_address_state_len_must_be_2():
    addr = profile.street_address()

    letters = string.ascii_lowercase
    addr.state = ''.join(random.choice(letters) for i in range(2))

    assert len(addr.state) == 2
コード例 #4
0
def test_street_address_zipcode_len_cant_be_6():
    addr = profile.street_address()

    letters = string.ascii_lowercase
    addr.zipcode = ''.join(random.choice(letters) for i in range(6))

    assert addr.zipcode == ''
コード例 #5
0
def test_street_address_state_len_cannot_be_less_than_2():
    addr = profile.street_address()

    letters = string.ascii_lowercase
    addr.state = ''.join(random.choice(letters) for i in range(100))

    assert addr.state == ''