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
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
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
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
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