Ejemplo n.º 1
0
 def test_reverse(self):
     ct = get_hosts_ordering_from_string("reverse")
     self.assertEqual(ct, HostsOrdering.REVERSE)
Ejemplo n.º 2
0
 def test_random(self):
     ct = get_hosts_ordering_from_string("random")
     self.assertEqual(ct, HostsOrdering.RANDOM)
Ejemplo n.º 3
0
 def test_none_or_empty(self):
     ct = get_hosts_ordering_from_string(None)
     self.assertIsNone(ct)
     ct = get_hosts_ordering_from_string('')
     self.assertIsNone(ct)
Ejemplo n.º 4
0
 def test_sequential(self):
     ct = get_hosts_ordering_from_string("sequential")
     self.assertEqual(ct, HostsOrdering.SEQUENTIAL)
Ejemplo n.º 5
0
 def test_invalid(self):
     with self.assertRaises(InvalidArgument):
         get_hosts_ordering_from_string('foo')