-
Notifications
You must be signed in to change notification settings - Fork 0
/
jiraInterface-test.py
53 lines (43 loc) · 1.6 KB
/
jiraInterface-test.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import unittest
import jiraInterface
import getpass
class TestSequenceFunctions(unittest.TestCase):
@classmethod
def setUpClass(self):
config = {}
config['JIRA'] = {}
config['JIRA']['apiuser'] = getpass.getpass("User: ")
config['JIRA']['apipassword'] = getpass.getpass()
config['JIRA']['apiurl'] = "https://jira.ika.rwth-aachen.de/rest/api/2/"
jiraInterface.init(config)
self.s = jiraInterface.jiraServer()
def test_DongleInfoUsbAddress1(self):
d = self.s.getDongle("1-1.2.6")
address = d.getUsbAddress()
self.assertEqual("1-1.2.6", address)
def test_DongleInfoUsbAddress2(self):
d = self.s.getDongle("1-1.3.1.5")
address = d.getUsbAddress()
self.assertEqual("1-1.3.1.5", address)
def test_DongleInfoUsbVid1(self):
d = self.s.getDongle("1-1.2.6")
vid = d.getUsbVid()
self.assertEqual("12345", vid)
def test_DongleInfoUsbVid2(self):
d = self.s.getDongle("1-1.3.1.5")
vid = d.getUsbVid()
self.assertEqual("", vid)
def test_DongleInfoUsbPid1(self):
d = self.s.getDongle("1-1.2.6")
pid = d.getUsbPid()
self.assertEqual("54321", pid)
def test_DongleInfoUsbPid2(self):
d = self.s.getDongle("1-1.3.1.5")
pid = d.getUsbPid()
self.assertEqual("", pid)
def test_DongleInfoDescription1(self):
d = self.s.getDongle("1-1.2.6")
desc = d.getDescription()
self.assertEqual("Silab #B", desc)
if __name__ == '__main__':
unittest.main()