Example #1
0
 def testPodValidateMisingAllRequiredFields(self):
     pod = {}
     with self.assertRaises(ValueError) as ve:
         pod = Pod('testPod', **pod)
         pod.validateRequiredFields()
     error = ve.exception.message
     self.assertEqual(10, error.count(','))
Example #2
0
 def testPodValidateMisingAllRequiredFields(self):
     pod = {}
     with self.assertRaises(ValueError) as ve:
         pod = Pod('testPod', **pod)
         pod.validateRequiredFields()
     error = ve.exception.message
     self.assertEqual(10, error.count(','))
Example #3
0
 def testPodValidateMisingFewRequiredFields(self):
     pod = {}
     pod['interConnectPrefix'] = '1.2.0.0'
     pod['leafAS'] = '100'
     with self.assertRaises(ValueError) as ve:
         pod = Pod('testPod', **pod)
         pod.validateRequiredFields()
     error = ve.exception.message
     self.assertEqual(8, error.count(','), 'Number of missing field is not correct')
Example #4
0
 def testPodValidateMisingFewRequiredFields(self):
     pod = {}
     pod['interConnectPrefix'] = '1.2.0.0'
     pod['leafAS'] = '100'
     with self.assertRaises(ValueError) as ve:
         pod = Pod('testPod', **pod)
         pod.validateRequiredFields()
     error = ve.exception.message
     self.assertEqual(8, error.count(','),
                      'Number of missing field is not correct')