Change endpoints/common to use a data interface
This commit is contained in:
parent
aecec02b6c
commit
f976ffbdc7
4 changed files with 67 additions and 12 deletions
|
@ -1,9 +1,9 @@
|
|||
import pytest
|
||||
|
||||
from data import model
|
||||
from endpoints.common import common_login
|
||||
|
||||
from test.fixtures import *
|
||||
from endpoints.common_models_pre_oci import pre_oci_model as model
|
||||
|
||||
@pytest.mark.parametrize('username, expect_success', [
|
||||
# Valid users.
|
||||
|
@ -20,6 +20,6 @@ from test.fixtures import *
|
|||
('unverified', False),
|
||||
])
|
||||
def test_common_login(username, expect_success, app):
|
||||
db_user = model.user.get_namespace_user(username)
|
||||
uuid = model.get_namespace_uuid(username)
|
||||
with app.app_context():
|
||||
assert common_login(db_user.uuid) == expect_success
|
||||
assert common_login(uuid) == expect_success
|
||||
|
|
Reference in a new issue