示例#1
0
    def test_get_pay_run_ien(self):
        cxn = self.user.vista_src.get_cxn()
        run = PayRun(fy=13, pay_period=15)
        run.set_pay_run_ien(cxn)
        self.assertEqual(559, run.ien)

        run.pay_period = 16
        run.set_pay_run_ien(cxn)
        self.assertEqual(560, run.ien)
示例#2
0
    def test_get_vista_data(self):
        cxn = self.user.vista_src.get_cxn()
        run = PayRun(fy=13, pay_period=15, cp_nbr='015')
        run.ien = 559
        vista_data = run._get_vista_data(cxn)
        self.assertIsNotNone(vista_data)
        self.assertEqual(39, len(vista_data))

        run = PayRun(fy=13, pay_period=15, cp_nbr='016')
        run.ien = 559
        vista_data = run._get_vista_data(cxn)
        self.assertIsNotNone(vista_data)
        self.assertEqual(87, len(vista_data))

        run = PayRun(fy=13, pay_period=16, cp_nbr='015')
        run.ien = 560
        vista_data = run._get_vista_data(cxn)
        self.assertIsNotNone(vista_data)
        self.assertEqual(39, len(vista_data))

        run = PayRun(fy=13, pay_period=16, cp_nbr='016')
        run.ien = 560
        vista_data = run._get_vista_data(cxn)
        self.assertIsNotNone(vista_data)
        self.assertEqual(85, len(vista_data))