Esempio n. 1
0
 def test_to_seconds_empty(self):
     self.assertEqual(dnsutil._to_seconds(''),
                      604800,
                      msg='Did not set empty time to one week')
Esempio n. 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')
Esempio n. 3
0
 def test_to_seconds_hour(self):
     self.assertEqual(dnsutil._to_seconds('4H'),
                      14400,
                      msg='Did not detect valid hours as invalid')
Esempio n. 4
0
 def test_to_seconds_day(self):
     self.assertEqual(dnsutil._to_seconds('1D'),
                      86400,
                      msg='Did not detect valid day as invalid')
Esempio n. 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')
Esempio n. 6
0
 def test_to_seconds_empty(self):
     self.assertEqual(dnsutil._to_seconds(''), 604800,
                      msg='Did not set empty time to one week')
Esempio n. 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')
Esempio n. 8
0
 def test_to_seconds_hour(self):
     self.assertEqual(dnsutil._to_seconds('4H'), 14400,
                      msg='Did not detect valid hours as invalid')
Esempio n. 9
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",
     )
Esempio n. 10
0
 def test_to_seconds_day(self):
     self.assertEqual(
         dnsutil._to_seconds("1D"), 86400, msg="Did not detect valid day as invalid"
     )
Esempio n. 11
0
 def test_to_seconds_hour(self):
     self.assertEqual(
         dnsutil._to_seconds("4H"),
         14400,
         msg="Did not detect valid hours as invalid",
     )