def test_rand(): possible = ["one", "two", "three"] string = "one two three" output = rand(string) assert output in possible
""") COMPANY_NAME_EXTRA = u(""" media designs collective systems labs """) ########NEW FILE######## __FILENAME__ = patterns import random from faker import data from faker.utils import rand CITY = lambda: random.choice([ " ".join([ rand(data.CITY_PREFIX), "".join( [rand(data.FIRST_NAMES), rand(data.CITY_SUFFIX)]) ]), " ".join([rand(data.CITY_PREFIX), rand(data.FIRST_NAMES)]), "".join([rand(data.FIRST_NAMES), rand(data.CITY_SUFFIX)]), "".join([rand(data.LAST_NAMES), rand(data.CITY_SUFFIX)]), ]) STREET_NAME = lambda: random.choice([ " ".join([rand(data.LAST_NAMES), rand(data.STREET_SUFFIX)]), " ".join( [rand(data.FIRST_NAMES),
def domain(): return rand(data.FREE_EMAIL)
def _get_names(self): self._names = [rand(data.FIRST_NAMES), rand(data.LAST_NAMES)] self._name_accesses = set()
def state(self): return rand(data.STATE_ABBR)
import random from faker import data from faker.utils import rand CITY = lambda: random.choice([ " ".join([rand(data.CITY_PREFIX), "".join([rand(data.FIRST_NAMES), rand(data.CITY_SUFFIX)])]), " ".join([rand(data.CITY_PREFIX), rand(data.FIRST_NAMES)]), "".join([rand(data.FIRST_NAMES), rand(data.CITY_SUFFIX)]), "".join([rand(data.LAST_NAMES), rand(data.CITY_SUFFIX)]), ]) STREET_NAME = lambda: random.choice([ " ".join([rand(data.LAST_NAMES), rand(data.STREET_SUFFIX)]), " ".join([rand(data.FIRST_NAMES), rand(data.STREET_SUFFIX)]) ]) COMPANY_NAME = lambda: random.choice([ "".join([rand(data.COMPANY_NAME_PREFIX), rand(data.COMPANY_NAME_SUFFIX)]), "".join([rand(data.COMPANY_NAME_PREFIX).capitalize(), rand(data.COMPANY_NAME_SUFFIX)]), "".join([rand(data.COMPANY_NAME_PREFIX).capitalize(), rand(data.COMPANY_NAME_SUFFIX).capitalize()]), "%s %s" % ("".join([rand(data.COMPANY_NAME_PREFIX).capitalize(), rand(data.COMPANY_NAME_SUFFIX)]), rand(data.COMPANY_NAME_EXTRA).capitalize()) ])