TestMultiuser.py 488 B

123456789101112131415
  1. import pytest
  2. import json
  3. from Config import config
  4. from User import UserManager
  5. @pytest.mark.usefixtures("resetSettings")
  6. @pytest.mark.usefixtures("resetTempSettings")
  7. class TestMultiuser:
  8. def testMemorySave(self, user):
  9. # It should not write users to disk
  10. users_before = open("%s/users.json" % config.data_dir).read()
  11. user = UserManager.user_manager.create()
  12. user.save()
  13. assert open("%s/users.json" % config.data_dir).read() == users_before