Пример #1
0
def fake_community(db, creator):
    """Create a fake community
    """
    name = community.normalize(faker.city())
    c = creator.create_community(name)
    creator.upsert_community_membership(True, c.id)
    return c
Пример #2
0
def fake_community(db, creator):
    """Create a fake community
    """
    name = community.normalize(faker.city())
    c = creator.create_community(name)
    creator.update_community_status('memberships', True, c.id)
    return c
Пример #3
0
def fake_community(db, creator):
    """Create a fake community
    """
    name = community.normalize(faker.city())
    c = creator.create_community(name)
    creator.update_community_status('memberships', True, c.id)
    return c
Пример #4
0
def fake_community(db, creator):
    """Create a fake community
    """
    name = community.normalize(faker.city())
    c = creator.create_community(name)
    creator.upsert_community_membership(True, c.id)
    return c
Пример #5
0
def fake_community(db, creator):
    """Create a fake community
    """
    name = community.normalize(faker.city())
    try:
        c = creator.create_community(name)
    except CommunityAlreadyExists:
        return fake_community(db, creator)
    creator.upsert_community_membership(True, c.id)
    return c