Ejemplo n.º 1
0
 def test_factory_tuple(self):
     host = Host.factory(('host01.example.com',))
     assert host.hostname == 'host01.example.com'
Ejemplo n.º 2
0
 def test_factory_exception(self):
     with pytest.raises(ValueError):
         Host.factory('host01.example.com')
Ejemplo n.º 3
0
 def test_factory_dict(self):
     host = Host.factory(dict(hostname='host01.example.com'))
     assert host.hostname == 'host01.example.com'