Exemple #1
0
 def test_to_seconds_empty(self):
     self.assertEqual(dnsutil._to_seconds(''),
                      604800,
                      msg='Did not set empty time to one week')
Exemple #2
0
 def test_to_seconds_large(self):
     self.assertEqual(
         dnsutil._to_seconds('604801'),
         604800,
         msg='Did not set time greater than one week to one week')
Exemple #3
0
 def test_to_seconds_hour(self):
     self.assertEqual(dnsutil._to_seconds('4H'),
                      14400,
                      msg='Did not detect valid hours as invalid')
Exemple #4
0
 def test_to_seconds_day(self):
     self.assertEqual(dnsutil._to_seconds('1D'),
                      86400,
                      msg='Did not detect valid day as invalid')
Exemple #5
0
 def test_to_seconds_week(self):
     self.assertEqual(dnsutil._to_seconds('2W'), 604800,
                      msg='Did not set time greater than one week to one week')
Exemple #6
0
 def test_to_seconds_empty(self):
     self.assertEqual(dnsutil._to_seconds(''), 604800,
                      msg='Did not set empty time to one week')
Exemple #7
0
 def test_to_seconds_day(self):
     print dnsutil._to_seconds('1d')
     self.assertEqual(dnsutil._to_seconds('1D'), 86400,
                      msg='Did not detect valid day as invalid')
Exemple #8
0
 def test_to_seconds_hour(self):
     self.assertEqual(dnsutil._to_seconds('4H'), 14400,
                      msg='Did not detect valid hours as invalid')
 def test_to_seconds_week(self):
     self.assertEqual(
         dnsutil._to_seconds("2W"),
         604800,
         msg="Did not set time greater than one week to one week",
     )
 def test_to_seconds_day(self):
     self.assertEqual(
         dnsutil._to_seconds("1D"), 86400, msg="Did not detect valid day as invalid"
     )
 def test_to_seconds_hour(self):
     self.assertEqual(
         dnsutil._to_seconds("4H"),
         14400,
         msg="Did not detect valid hours as invalid",
     )