Beispiel #1
0
 def test_device_constants(self):
     device = NewDevice(
         os.path.join(os.path.dirname(__file__), '../devices/bbb-01.yaml'))
     self.assertIn('constants', device)
     self.assertEqual(device.get_constant('kernel-start-message'),
                      "Linux version [0-9]")
     self.assertRaises(ConfigurationError, device.get_constant,
                       ('non-existing-const'))
Beispiel #2
0
 def test_device_constants(self):
     factory = Factory()
     (rendered, _) = factory.create_device('bbb-01.jinja2')
     device = NewDevice(yaml.safe_load(rendered))
     self.assertIn('constants', device)
     self.assertEqual(device.get_constant('kernel-start-message'), "Linux version [0-9]")
     self.assertRaises(ConfigurationError,
                       device.get_constant, ('non-existing-const'))
Beispiel #3
0
 def test_device_constants(self):
     factory = Factory()
     (rendered, _) = factory.create_device("bbb-01.jinja2")
     device = NewDevice(yaml_safe_load(rendered))
     self.assertIn("constants", device)
     self.assertEqual(device.get_constant("kernel-start-message"),
                      "Linux version [0-9]")
     self.assertRaises(ConfigurationError, device.get_constant,
                       ("non-existing-const"))
Beispiel #4
0
 def test_device_constants(self):
     device = NewDevice(os.path.join(os.path.dirname(__file__), '../devices/bbb-01.yaml'))
     self.assertIn('constants', device)
     self.assertEqual(device.get_constant('kernel-start-message'), "Linux version [0-9]")
     self.assertRaises(ConfigurationError,
                       device.get_constant, ('non-existing-const'))