Ejemplo n.º 1
0
    def test_process_result_value(self):
        obj = bulkdata.EpochType()

        # Non-None value
        result = obj.process_result_value(1000, None)
        self.assertEqual(datetime(1970, 1, 1, 0, 0, 1), result)

        # None value
        result = obj.process_result_value(None, None)
        self.assertEqual(None, result)
Ejemplo n.º 2
0
 def test_process_bind_param(self):
     obj = bulkdata.EpochType()
     dt = datetime(1970, 1, 1, 0, 0, 1)
     result = obj.process_bind_param(dt, None)
     self.assertEqual(1000, result)