Esempio n. 1
0
    def __diff_datetimes(self, level):
        """Diff DateTimes"""
        levels = []
        if self.truncate_datetime:
            level.t1 = datetime_normalize(self.truncate_datetime, level.t1)
            level.t2 = datetime_normalize(self.truncate_datetime, level.t2)

        if level.t1 != level.t2:
            self.__report_result('values_changed', level)
Esempio n. 2
0
 def _prep_datetime(self, obj):
     type_ = 'datetime'
     obj = datetime_normalize(self.truncate_datetime, obj)
     return KEY_TO_VAL_STR.format(type_, obj)
Esempio n. 3
0
 def test_datetime_normalize(self, truncate_datetime, obj, expected):
     result = datetime_normalize(truncate_datetime, obj)
     assert expected == result