-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.py
More file actions
32 lines (24 loc) · 948 Bytes
/
Copy pathtests.py
File metadata and controls
32 lines (24 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from PyQt5.QtTest import QTest
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication
import sys
import unittest
import datetime
from unittest import mock
from controllers.controller import Controller
from models.model import Model
from views.view import View
app = QApplication(sys.argv)
class AppTest(unittest.TestCase):
'''Test the margarita mixer GUI'''
def setUp(self):
'''Create the model, controller & GUI'''
self.current_version = '4.4.1'
self.model = Model()
self.controller = Controller(self.model)
self.controller.scanner_thread.close() # getting PermissionError when left open while testing - Mock it instead
self.view = View(self.model, self.controller)
def test_version(self):
self.assertEqual(self.controller._model.version, self.current_version, 'Version should be changed for each update')
if __name__ == "__main__":
unittest.main()