Esempio n. 1
0
    def test_given_good_entries_then_return(self):
        time_stamp = 1407847810

        time_and_date = dls_logs_since_release.convert_time_stamp(time_stamp)

        reg_ex = "\d{2}/\d{2}/\d{4} \d{2}:\d{2}:\d{2}"
        self.assertRegexpMatches(time_and_date, reg_ex)
    def test_given_good_entries_then_return(self):
        time_stamp = 1407847810

        time_and_date = dls_logs_since_release.convert_time_stamp(time_stamp)

        reg_ex = "\d{2}/\d{2}/\d{4} \d{2}:\d{2}:\d{2}"
        self.assertRegexpMatches(time_and_date, reg_ex)
Esempio n. 3
0
    def test_given_time_returns_bad_entry_then_return_default(self, _1):
        time_stamp = 1407847810

        time_and_date = dls_logs_since_release.convert_time_stamp(time_stamp)

        self.assertEqual(time_and_date, 'no time/date')
Esempio n. 4
0
    def test_given_not_int_then_return_default(self):
        time_stamp = ''

        time_and_date = dls_logs_since_release.convert_time_stamp(time_stamp)

        self.assertEqual(time_and_date, 'no time/date')
    def test_given_time_returns_bad_entry_then_return_default(self, _1):
        time_stamp = 1407847810

        time_and_date = dls_logs_since_release.convert_time_stamp(time_stamp)

        self.assertEqual(time_and_date, 'no time/date')
    def test_given_not_int_then_return_default(self):
        time_stamp = ''

        time_and_date = dls_logs_since_release.convert_time_stamp(time_stamp)

        self.assertEqual(time_and_date, 'no time/date')