def mock_get_logged_in_user(request):
    geniuser = models.GeniUser(username='******',
                               password='******',
                               email='*****@*****.**',
                               affiliation='test affil',
                               user_pubkey='user_pubkey',
                               user_privkey='user_privkey',
                               donor_pubkey='donor_pubkey',
                               usable_vessel_port='12345',
                               free_vessel_credits=10)
    return geniuser
def mock_interface_get_user_with_password(username, password):
    geniuser = models.GeniUser(username=username,
                               password=password,
                               email='*****@*****.**',
                               affiliation='test affil',
                               user_pubkey='user_pubkey',
                               user_privkey='user_privkey',
                               donor_pubkey='donor_pubkey',
                               usable_vessel_port='12345',
                               free_vessel_credits=10)
    geniuser.password = password
    # Not saving the geniuser record, we're not trying to interact with the db.
    return geniuser
def create_mock_get_user(username,
                         password="******",
                         api_key="testapikey",
                         pubkeystr="pubkeystr",
                         privkeystr="privkeystr"):

    geniuser = models.GeniUser(username=username,
                               password=password,
                               email='*****@*****.**',
                               affiliation='test affil',
                               user_pubkey=pubkeystr,
                               user_privkey=privkeystr,
                               donor_pubkey='donor_pubkey',
                               usable_vessel_port='12345',
                               free_vessel_credits=10,
                               api_key=api_key)

    # Not saving the geniuser record, we're not trying to interact with the db.

    def mock_interface_get_user(username, *args, **kwargs):
        return geniuser

    return mock_interface_get_user