Beispiel #1
0
def test_minespace_user_model_find_all(db_session):
    user1 = MinespaceUserFactory()
    user2 = MinespaceUserFactory()

    all_mu = MinespaceUser.get_all()
    assert len(all_mu) == 2
    assert any(mu.email == user1.email for mu in all_mu)
Beispiel #2
0
 def get(self):
     if request.args.get('email_or_username'):
         ms_users = [
             MinespaceUser.find_by_email(
                 request.args.get('email_or_username'))
         ]
     else:
         ms_users = MinespaceUser.get_all()
     return ms_users