Add simple test for Multiuser plugin

This commit is contained in:
shortcutme 2019-04-15 22:16:05 +02:00
parent 54ff940c2b
commit bf7597e1b2
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
3 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,14 @@
import pytest
import json
from Config import config
from User import UserManager
@pytest.mark.usefixtures("resetSettings")
@pytest.mark.usefixtures("resetTempSettings")
class TestMultiuser:
def testMemorySave(self, user):
# It should not write users to disk
users_before = open("%s/users.json" % config.data_dir).read()
user = UserManager.user_manager.create()
user.save()
assert open("%s/users.json" % config.data_dir).read() == users_before

View file

@ -0,0 +1 @@
from src.Test.conftest import *

View file

@ -0,0 +1,5 @@
[pytest]
python_files = Test*.py
addopts = -rsxX -v --durations=6
markers =
webtest: mark a test as a webtest.