-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRow1Test.py
33 lines (27 loc) · 1.37 KB
/
Row1Test.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
from pystratum_middle.exception.ResultException import ResultException
from test.StratumTestCase import StratumTestCase
class Row1Test(StratumTestCase):
# ------------------------------------------------------------------------------------------------------------------
def test1(self):
"""
Stored routine with designation type row1 must return 1 row and 1 row only.
"""
ret = self._dl.tst_test_row1a(1)
self.assertIsInstance(ret, dict)
# ------------------------------------------------------------------------------------------------------------------
def test2(self):
"""
An exception must be thrown when a stored routine with designation type row1 returns 0 rows.
@expectedException Exception
"""
with self.assertRaises(ResultException):
self._dl.tst_test_row1a(0)
# ------------------------------------------------------------------------------------------------------------------
def test3(self):
"""
An exception must be thrown when a stored routine with designation type row1 returns more than 1 rows.
@expectedException Exception
"""
with self.assertRaises(ResultException):
self._dl.tst_test_row1a(2)
# ----------------------------------------------------------------------------------------------------------------------