예제 #1
0
def fake_community(db, creator):
    """Create a fake community
    """
    name = faker.city()
    if not community.name_pattern.match(name):
        return fake_community(db, creator)

    slug = community.slugize(name)

    creator.insert_into_communities(True, name, slug)

    return community.Community.from_slug(slug)
예제 #2
0
def fake_community(db, creator):
    """Create a fake community
    """
    name = faker.city()
    if not community.name_pattern.match(name):
        return fake_community(db, creator)

    slug = community.slugize(name)

    creator.insert_into_communities(True, name, slug)

    return community.Community.from_slug(slug)
예제 #3
0
 def add_participant(self, participant_name):
     participant = self.make_participant(participant_name)
     participant.insert_into_communities(True, 'test', slugize('test'))
     return participant
예제 #4
0
 def add_participant(self, participant_name):
     participant = self.make_participant(participant_name)
     participant.insert_into_communities(True, 'test', slugize('test'))
     return participant