@@ -1205,57 +1205,5 @@ def test_given_record_without_cursor_value_when_should_be_synced_then_return_tru
12051205 assert cursor .should_be_synced (Record ({"record without cursor value" : "any" }, ANY_SLICE ))
12061206
12071207
1208- def test_given_first_greater_than_second_then_return_true ():
1209- cursor = DatetimeBasedCursor (
1210- start_datetime = MinMaxDatetime ("3000-01-01" , parameters = {}),
1211- cursor_field = "cursor_field" ,
1212- datetime_format = "%Y-%m-%d" ,
1213- config = config ,
1214- parameters = {},
1215- )
1216- assert cursor .is_greater_than_or_equal (
1217- Record ({"cursor_field" : "2023-01-01" }, {}), Record ({"cursor_field" : "2021-01-01" }, {})
1218- )
1219-
1220-
1221- def test_given_first_lesser_than_second_then_return_false ():
1222- cursor = DatetimeBasedCursor (
1223- start_datetime = MinMaxDatetime ("3000-01-01" , parameters = {}),
1224- cursor_field = "cursor_field" ,
1225- datetime_format = "%Y-%m-%d" ,
1226- config = config ,
1227- parameters = {},
1228- )
1229- assert not cursor .is_greater_than_or_equal (
1230- Record ({"cursor_field" : "2021-01-01" }, {}), Record ({"cursor_field" : "2023-01-01" }, {})
1231- )
1232-
1233-
1234- def test_given_no_cursor_value_for_second_than_second_then_return_true ():
1235- cursor = DatetimeBasedCursor (
1236- start_datetime = MinMaxDatetime ("3000-01-01" , parameters = {}),
1237- cursor_field = "cursor_field" ,
1238- datetime_format = "%Y-%m-%d" ,
1239- config = config ,
1240- parameters = {},
1241- )
1242- assert cursor .is_greater_than_or_equal (
1243- Record ({"cursor_field" : "2021-01-01" }, {}), Record ({}, {})
1244- )
1245-
1246-
1247- def test_given_no_cursor_value_for_first_than_second_then_return_false ():
1248- cursor = DatetimeBasedCursor (
1249- start_datetime = MinMaxDatetime ("3000-01-01" , parameters = {}),
1250- cursor_field = "cursor_field" ,
1251- datetime_format = "%Y-%m-%d" ,
1252- config = config ,
1253- parameters = {},
1254- )
1255- assert not cursor .is_greater_than_or_equal (
1256- Record ({}, {}), Record ({"cursor_field" : "2021-01-01" }, {})
1257- )
1258-
1259-
12601208if __name__ == "__main__" :
12611209 unittest .main ()
0 commit comments