Beispiel #1
0
 def issue_instant_ok(self):
     """ Check that the response was issued at a reasonable time """
     upper = time_util.shift_time(time_util.time_in_a_while(days=1), self.timeslack).timetuple()
     lower = time_util.shift_time(time_util.time_a_while_ago(days=1), -self.timeslack).timetuple()
     # print("issue_instant: %s" % self.response.issue_instant)
     # print("%s < x < %s" % (lower, upper))
     issued_at = str_to_time(self.response.issue_instant)
     return lower < issued_at < upper
Beispiel #2
0
 def issue_instant_ok(self):
     """ Check that the response was issued at a reasonable time """
     upper = time_util.shift_time(time_util.time_in_a_while(days=1),
                                  self.timeslack).timetuple()
     lower = time_util.shift_time(time_util.time_a_while_ago(days=1),
                                  -self.timeslack).timetuple()
     # print "issue_instant: %s" % self.response.issue_instant
     # print "%s < x < %s" % (lower, upper)
     issued_at = str_to_time(self.response.issue_instant)
     return lower < issued_at < upper
Beispiel #3
0
 def issue_instant_ok(self):
     """ Check that the request was issued at a reasonable time """
     upper = time_util.shift_time(time_util.time_in_a_while(days=1),
                                 self.timeslack).timetuple()
     lower = time_util.shift_time(time_util.time_a_while_ago(days=1),
                                 -self.timeslack).timetuple()
     # print "issue_instant: %s" % self.message.issue_instant
     # print "%s < x < %s" % (lower, upper)
     issued_at = time_util.str_to_time(self.message.issue_instant)
     return issued_at > lower and issued_at < upper
Beispiel #4
0
 def issue_instant_ok(self):
     """ Check that the request was issued at a reasonable time """
     upper = time_util.shift_time(time_util.time_in_a_while(days=1),
                                  self.timeslack).timetuple()
     lower = time_util.shift_time(time_util.time_a_while_ago(days=1),
                                  -self.timeslack).timetuple()
     # print("issue_instant: %s" % self.message.issue_instant)
     # print("%s < x < %s" % (lower, upper))
     issued_at = time_util.str_to_time(self.message.issue_instant)
     return issued_at > lower and issued_at < upper