def test_username_exists(self): exists, ref = UsersDb.username_exists(TEST_USER_NAME) assert exists == True assert ref.get().id == TEST_USER_ID
def test_username_exists_not(self): exists, ref = UsersDb.username_exists('SOmeNoneExistingNamelksjflkjsf') assert exists == False assert ref == None
async def get_check(username: str): exists, ref = UsersDb.username_exists(username) return UserExists(exists=exists)