def test_change_data_capture_with_empty_response(self, make_request): make_request.return_value = self.cdc_empty_json_response.copy() cdc_response = change_data_capture([Invoice, Customer], datetime(2017, 1, 1, 0, 0, 0)) self.assertFalse(hasattr(cdc_response, 'Customer')) self.assertFalse(hasattr(cdc_response, 'Invoice'))
def test_change_data_capture_with_timestamp(self, make_request): make_request.return_value = self.cdc_json_response.copy() cdc_response_with_datetime = change_data_capture([Invoice, Customer], datetime( 2017, 1, 1, 0, 0, 0)) self.assertEquals(1, len(cdc_response_with_datetime.Customer)) self.assertEquals(2, len(cdc_response_with_datetime.Invoice))
def test_change_data_capture(self, make_request): make_request.return_value = self.cdc_json_response.copy() cdc_response = change_data_capture([Invoice, Customer], "2017-01-01T00:00:00") self.assertEquals(1, len(cdc_response.Customer)) self.assertEquals(2, len(cdc_response.Invoice))