mirror of
https://github.com/rommapp/romm.git
synced 2026-07-01 08:16:21 +00:00
Add test for user model
This commit is contained in:
@@ -1 +1 @@
|
||||
from handler.tests.conftest import rom, platform
|
||||
from handler.tests.conftest import rom, platform, admin_user, editor_user, user # noqa
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from models.rom import Rom
|
||||
|
||||
def test_rom(rom):
|
||||
assert rom.file_path == "test_platform_slug/roms"
|
||||
assert rom.full_path == "test_platform_slug/roms/test_rom"
|
||||
|
||||
10
backend/models/tests/test_user.py
Normal file
10
backend/models/tests/test_user.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from utils.oauth import DEFAULT_SCOPES, WRITE_SCOPES, FULL_SCOPES
|
||||
|
||||
def test_admin_user(admin_user):
|
||||
admin_user.oauth_scopes == FULL_SCOPES
|
||||
|
||||
def test_editor_user(editor_user):
|
||||
editor_user.oauth_scopes == WRITE_SCOPES
|
||||
|
||||
def test_user(user):
|
||||
user.oauth_scopes == DEFAULT_SCOPES
|
||||
Reference in New Issue
Block a user