aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_dataframes.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_dataframes.py b/tests/test_dataframes.py
index 8f32b1d..70aefe8 100644
--- a/tests/test_dataframes.py
+++ b/tests/test_dataframes.py
@@ -129,7 +129,8 @@ class TestCreateDimTransaction:
class TestCreateFactPayment:
def test_returns_correct_columns_payment(self):
- dict_df = {'payment':pd.DataFrame(data=[[dt(2020,5,17,6,15,20),dt(2020,5,20,8,19,30),1,'SE18 9QO','2020-7-16']],
+ dict_df = {'payment':pd.DataFrame(data=[[dt.strptime('2022-11-03 14:20:49.962846','%Y-%m-%d %H:%M:%S.%f'),
+ dt.strptime('2022-12-14 16:20:49.962194','%Y-%m-%d %H:%M:%S.%f'),1,'SE18 9QO','2020-07-16']],
columns=['created_at','last_updated','payment_id','some_other_id','payment_date'])}
expected_cols = ['payment_record_id','created_date','created_time','last_updated_date',
'last_updated_time','payment_date','payment_id','some_other_id']
@@ -138,7 +139,11 @@ class TestCreateFactPayment:
for col in list(result.columns):
assert col in expected_cols
for col in expected_cols:
- if 'date' in col:
+ if '_date' in col:
+ print(col)
assert result[col].dtype == 'datetime64[ns]'
+ if '_time' in col:
+ print(col)
+ assert result[col].dtype == 'O' #<< O for object
\ No newline at end of file
git.ajschof.me — hosted by ajschofield — powered by cgit