Exemple #1
0
 def test_secondary_training_status_message_status_changed(self):
     now = datetime.now(get_localzone())
     SECONDARY_STATUS_DESCRIPTION_1['LastModifiedTime'] = now
     expected = '{} {} - {}'.format(
         datetime.utcfromtimestamp(time.mktime(
             now.timetuple())).strftime('%Y-%m-%d %H:%M:%S'), status,
         message)
     self.assertEqual(
         secondary_training_status_message(SECONDARY_STATUS_DESCRIPTION_1,
                                           SECONDARY_STATUS_DESCRIPTION_2),
         expected)
 def test_secondary_training_status_message_status_changed(self):
     now = datetime.now(get_localzone())
     SECONDARY_STATUS_DESCRIPTION_1['LastModifiedTime'] = now
     expected = '{} {} - {}'.format(
         datetime.utcfromtimestamp(time.mktime(now.timetuple())).strftime('%Y-%m-%d %H:%M:%S'),
         status,
         message
     )
     self.assertEqual(
         secondary_training_status_message(SECONDARY_STATUS_DESCRIPTION_1, SECONDARY_STATUS_DESCRIPTION_2),
         expected)