def test_by_mail_and_username_wrong_username(self, db_session):
        add_user(db_session)
        queried_user = User.by_email_and_username('email',
                                                  'wrong_username',
                                                  db_session=db_session)

        assert queried_user is None
    def test_by_mail_and_username(self, db_session):
        created_user = add_user(db_session)
        queried_user = User.by_email_and_username('email',
                                                  'username',
                                                  db_session=db_session)

        assert created_user == queried_user
 def test_by_mail_and_username_none(self, db_session):
     found = User.by_email_and_username('email',
                                        None,
                                        db_session=db_session)
     assert found is None
 def test_by_mail_and_username_none(self, db_session):
     found = User.by_email_and_username('email', None,
                                        db_session=db_session)
     assert found is None
    def test_by_mail_and_username_wrong_username(self, db_session):
        add_user(db_session)
        queried_user = User.by_email_and_username('email', 'wrong_username',
                                                  db_session=db_session)

        assert queried_user is None
    def test_by_mail_and_username(self, db_session):
        created_user = add_user(db_session)
        queried_user = User.by_email_and_username('email', 'username',
                                                  db_session=db_session)

        assert created_user == queried_user