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