__init__.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/python2 -O
  2. # vim: fileencoding=utf-8
  3. # pylint: disable=protected-access,pointless-statement
  4. #
  5. # The Qubes OS Project, https://www.qubes-os.org/
  6. #
  7. # Copyright (C) 2015 Joanna Rutkowska <joanna@invisiblethingslab.com>
  8. # Copyright (C) 2015 Wojtek Porczyk <woju@invisiblethingslab.com>
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; either version 2 of the License, or
  13. # (at your option) any later version.
  14. #
  15. # This program is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. # GNU General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU General Public License along
  21. # with this program; if not, write to the Free Software Foundation, Inc.,
  22. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  23. #
  24. import qubes.tests
  25. class TestVMM(object):
  26. # pylint: disable=too-few-public-methods
  27. def __init__(self, offline_mode=False):
  28. self.offline_mode = offline_mode
  29. class TestHost(object):
  30. # pylint: disable=too-few-public-methods
  31. def __init__(self):
  32. self.memory_total = 1000 * 1024
  33. self.no_cpus = 4
  34. class TestApp(qubes.tests.TestEmitter):
  35. labels = {1: qubes.Label(1, '0xcc0000', 'red')}
  36. get_label = qubes.Qubes.get_label
  37. check_updates_vm = False
  38. def __init__(self):
  39. super(TestApp, self).__init__()
  40. self.vmm = TestVMM()
  41. self.host = TestHost()