def test_phone_number_areacode(): a = areacode() assert len(a.areacode) == 3 assert isinstance(a.areacode, unicode) assert 201 <= int(a.areacode) <= 989 assert bool(match(r"\d{3}", a.areacode))
def test_phone_number_areacode_with_state(): a = areacode("AB") assert a.areacode in ["780", "403"] assert isinstance(a.areacode, unicode)
def test_area_code_default(): a = areacode() assert 201 <= int(a.areacode) <= 989 assert len(a.state) == 2