test_base_ui.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # ============================================================================
  2. # This file is part of Pwman3.
  3. #
  4. # Pwman3 is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License, version 2
  6. # as published by the Free Software Foundation;
  7. #
  8. # Pwman3 is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with Pwman3; if not, write to the Free Software
  15. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. # ============================================================================
  17. # Copyright (C) 2014 Oz Nahum Tiram <nahumoz@gmail.com>
  18. # ============================================================================
  19. import os
  20. import unittest
  21. from pwman.data.drivers.sqlite import SQLite
  22. from pwman.data.nodes import Node
  23. from pwman.util.crypto_engine import CryptoEngine
  24. from .test_crypto_engine import give_key, DummyCallback
  25. from pwman.ui.baseui import BaseCommands
  26. class TestSQLite(unittest.TestCase):
  27. pass
  28. if __name__ == '__main__':
  29. ce = CryptoEngine.get()
  30. ce.callback = DummyCallback()
  31. ce.changepassword(reader=give_key)
  32. try:
  33. unittest.main(verbosity=2, failfast=True)
  34. except SystemExit:
  35. os.remove('test.db')