示例#1
0
 def test_empty_JSONList(self):
     json_list = JsonList([])
     try:
         json_list.assert_not_empty(msg = "Should not be empty")
     except AssertionError as ae:
         pass
     else:
         raise AssertionError("Assert non empty Json List is not working as expected")
示例#2
0
 def test_JSONList_min_size_03(self):
     exp_list = [1]*10
     json_list = JsonList(exp_list)
     try:
         json_list.assert_min_size(len(exp_list)+5,  msg = "Should match with expected min size")
     except AssertionError as ae:
         pass
     else:
         raise AssertionError("assert_min_size Json List is not working as expected")
示例#3
0
 def test_JSONList_size_06(self):
     exp_list = [1,2,34]
     json_list = JsonList(exp_list)
     try:
         json_list.assert_size(None,  msg = "Should match with expected size")
     except AssertionError as ae:
         pass
     else:
         raise AssertionError("assert_size Json List is not working as expected")
示例#4
0
 def test_JSONList_max_size_04(self):
     exp_list = [1]*10
     json_list = JsonList(exp_list)
     try:
         json_list.assert_max_size("2",   msg = "Should match with expected max size")
     except TypeError as ae:
         pass
     else:
         raise AssertionError("assert_max_size Json List is not working as expected")
示例#5
0
 def test_empty_JSONList_construct01(self):
     try :
         json_list = JsonList()
     except TypeError as te:
         pass
     else :
         raise AssertionError("JsonList shouldn't allow with default construct")
示例#6
0
 def test_JSONList_min_size_02(self):
     exp_list = [1]*10
     json_list = JsonList(exp_list)
     json_list.assert_min_size(len(exp_list)-5,  msg = "Should match with expected min size")
示例#7
0
 def test_JSONList_size_01(self):
     exp_list = [1,2,34]
     json_list = JsonList(exp_list)
     json_list.assert_size(len(exp_list), msg = "Should match with expected size")
示例#8
0
 def test_non_empty_JSONList(self):
     json_list = JsonList([1])
     json_list.assert_not_empty(msg = "Should not be empty")
示例#9
0
 def test_JSONList_size_range_01(self):
     exp_list = [1]*10
     json_list = JsonList(exp_list)
     json_list.assert_size_range(len(exp_list)-5, len(exp_list),   msg = "Should be within the range")
示例#10
0
 def test_empty_JSONList_construct02(self):
     json_list = JsonList([])
     json_list.assert_empty(msg = "Should be empty")
示例#11
0
 def test_JSONList_max_size_05(self):
         exp_list = [1]*10
         json_list = JsonList(exp_list)
         json_list.assert_max_size(10.5,   msg = "Should match with expected max size")
示例#12
0
 def test_JSONList_max_size_03(self):
     exp_list = []
     json_list = JsonList(exp_list)
     json_list.assert_max_size(0,   msg = "Should match with expected max size")