コード例 #1
0
ファイル: test_dnsutil.py プロジェクト: bsemar/IntCont
 def test_to_seconds_empty(self):
     self.assertEqual(dnsutil._to_seconds(''),
                      604800,
                      msg='Did not set empty time to one week')
コード例 #2
0
ファイル: test_dnsutil.py プロジェクト: bsemar/IntCont
 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')
コード例 #3
0
ファイル: test_dnsutil.py プロジェクト: bsemar/IntCont
 def test_to_seconds_hour(self):
     self.assertEqual(dnsutil._to_seconds('4H'),
                      14400,
                      msg='Did not detect valid hours as invalid')
コード例 #4
0
ファイル: test_dnsutil.py プロジェクト: bsemar/IntCont
 def test_to_seconds_day(self):
     self.assertEqual(dnsutil._to_seconds('1D'),
                      86400,
                      msg='Did not detect valid day as invalid')
コード例 #5
0
ファイル: dnsutil_test.py プロジェクト: AccelerationNet/salt
 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')
コード例 #6
0
ファイル: dnsutil_test.py プロジェクト: AccelerationNet/salt
 def test_to_seconds_empty(self):
     self.assertEqual(dnsutil._to_seconds(''), 604800,
                      msg='Did not set empty time to one week')
コード例 #7
0
ファイル: dnsutil_test.py プロジェクト: AccelerationNet/salt
 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')
コード例 #8
0
ファイル: dnsutil_test.py プロジェクト: AccelerationNet/salt
 def test_to_seconds_hour(self):
     self.assertEqual(dnsutil._to_seconds('4H'), 14400,
                      msg='Did not detect valid hours as invalid')
コード例 #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",
     )
コード例 #10
0
 def test_to_seconds_day(self):
     self.assertEqual(
         dnsutil._to_seconds("1D"), 86400, msg="Did not detect valid day as invalid"
     )
コード例 #11
0
 def test_to_seconds_hour(self):
     self.assertEqual(
         dnsutil._to_seconds("4H"),
         14400,
         msg="Did not detect valid hours as invalid",
     )