def user(session: Session) -> User: test_user = create_model( session, User, username='******', password='******', email='*****@*****.**', language='english' ) yield test_user delete_instance(session, test_user)
def sender(session: Session) -> User: sender = create_model( session, User, username='******', password='******', email='*****@*****.**', language='english' ) yield sender delete_instance(session, sender)
def bad_user(session: Session) -> User: test_user = create_model( session, User, username='******', password='******', email='test.email#gmail.com', ) yield test_user delete_instance(session, test_user)
def zodiac1(session: Session) -> Zodiac: zodiac = create_model( session, Zodiac, name="aries", start_month=3, start_day_in_month=20, end_month=4, end_day_in_month=19, ) yield zodiac delete_instance(session, zodiac)
def invitation(event: Event, user: User, session: Session) -> Event: invitation = create_model( session, Invitation, creation=datetime.now(), recipient=user, event=event, event_id=event.id, recipient_id=user.id, ) yield invitation delete_instance(session, invitation)
def add_quote(session: Session, id_quote: int, text: str, author: str) -> Quote: quote = create_model(session, Quote, id=id_quote, text=text, author=author) yield quote delete_instance(session, quote)