def test_check_row_noOther(self):
        prev = [36,1,2,3,4,5,6,7,8,9]
        data = ["44","2","3","4","5","6","7","8","9",""]

        ok = check_row(0,prev,data)

        self.assertTrue(ok)
    def test_check_row_missingT(self):
        prev = [36,1,2,3,4,5,6,7,8,9]
        data = ["44","2","","4","5","6","7","8","9","10"]

        ok = check_row(0,prev,data)

        self.assertFalse(ok)
Example #3
0
 def test_only_tall(self):
     test_data = "446,,,,,,,,,"
     str_vals = test_data.strip().split(",")
     prev = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     row = 2
     self.assertTrue(check_row(row, prev, str_vals),
                     'Invalid Data at Row: ' + str(row))
    def test_check_row_allPopulated(self):
        prev = [36,1,2,3,4,5,6,7,8,9]
        data = ["44","2","3","4","5","6","7","8","9","10"]

        ok = check_row(0,prev,data)

        self.assertTrue(ok)
Example #5
0
 def test_empty(self):
     test_data = ""
     str_vals = test_data.strip().split(",")
     prev = [2732, 284, 403, 266, 452, 472, 542, 176, 137, 218]
     row = 59
     self.assertTrue(check_row(59, prev, str_vals),
                     'Empty Data at Row: ' + str(row))
Example #6
0
 def test_one_missing(self):
     test_data = "1467,,225,119,174,321,205,94,135,182"
     str_vals = test_data.strip().split(",")
     prev = [1453, 192, 221, 119, 167, 320, 204, 94, 136, 180]
     row = 47
     self.assertTrue(check_row(47, prev, str_vals),
                     'Invalid Data at Row: ' + str(row))
Example #7
0
 def test_only_last_value(self):
     test_data = ",,,,,,,,,0"
     str_vals = test_data.strip().split(",")
     prev = [1195, 173, 180, 93, 109, 296, 145, 78, 121, 0]
     row = 38
     self.assertTrue(check_row(38, prev, str_vals),
                     'Invalid Data at Row: ' + str(row))
Example #8
0
 def test_all_values(self):
     test_data = "919,125,152,62,59,260,108,61,92,0"
     str_vals = test_data.strip().split(",")
     prev = [865, 94, 147, 60, 54, 257, 106, 60, 87, 0]
     row = 23
     self.assertTrue(check_row(23, prev, str_vals),
                     'Invalid Data at Row: ' + str(row))
Example #9
0
 def test_no_last_value(self):
     test_data = "764,74,145,50,44,242,97,51,61,"
     str_vals = test_data.strip().split(",")
     prev = [748, 73, 143, 49, 43, 237, 97, 50, 56, 0]
     row = 15
     self.assertTrue(check_row(15, prev, str_vals),
                     'Invalid Data at Row: ' + str(row))
Example #10
0
 def test_check_row_NotTotal(self):
     result = datamunger.check_row(
         1, [0, 53, 24, 13, 53, 788, 323, 1, 453, 6, 234],
         [1, 53, 24, 13, 53, 788, 323, 1, 453, 6, 234])
     self.assertEqual(result, True)
Example #11
0
 def test_check_row_Missing(self):
     result = datamunger.check_row(
         1, [0, 53, 24, 13, 53, 788, 323, 1, 453, 6, 234],
         [' ', 52, 23, 13, 53, 788, 323, 1, 453, 6, 234])
     self.assertEqual(result, False)
Example #12
0
 def test_check_row_Correct(self):
     result = datamunger.check_row(
         1, [0, 53, 24, 13, 53, 788, 323, 1, 453, 6, 234],
         [1708, 53, 24, 13, 53, 788, 323, 1, 453, 6, 234])
     expected = True
     self.assertEqual(result, expected)
Example #13
0
 def test_CheckMissingOther(self):
     testPrev = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     testCurr = [100, 20, 10, 5, 5, 6, 7, 8, 9, ""]
     result = datamunger.check_row(1, testPrev, testCurr)
     check = True
     self.assertEqual(result, check)
Example #14
0
 def test_CheckMissingFail(self):
     testPrev = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     testCurr = [100, 20, 10, "", "", "", "", "", "", ""]
     result = datamunger.check_row(1, testPrev, testCurr)
     check = False
     self.assertEqual(result, check)
Example #15
0
 def test_CheckMissing(self):
     testPrev = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     testCurr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     result = datamunger.check_row(1, testPrev, testCurr)
     check = True
     self.assertEqual(result, check)