Пример #1
0
 def test_hash_of_command(self):
     h1 = pabot.get_hash_of_command({})
     h2 = pabot.get_hash_of_command({"key":"value"})
     h3 = pabot.get_hash_of_command({"key2": [], "key":"value"})
     h4 = pabot.get_hash_of_command({"pythonpath":"foobarzoo", "key":"value"})
     h5 = pabot.get_hash_of_command({"key":"value", "key2": "value2"})
     self.assertEqual("97d170e1550eee4afc0af065b78cda302a97674c", h1)
     self.assertNotEqual(h1, h2)
     self.assertEqual(h2, h3)
     self.assertEqual(h2, h4)
     self.assertNotEqual(h2, h5)
Пример #2
0
 def test_hash_of_command(self):
     h1 = pabot.get_hash_of_command({}, {})
     h2 = pabot.get_hash_of_command({"key": "value"}, {})
     h3 = pabot.get_hash_of_command({"key2": [], "key": "value"}, {})
     h4 = pabot.get_hash_of_command(
         {
             "pythonpath": "foobarzoo",
             "key": "value"
         }, {})
     h5 = pabot.get_hash_of_command({"key": "value", "key2": "value2"}, {})
     h6 = pabot.get_hash_of_command({
         "key": "value",
         "key2": "value2"
     }, {"foo": "bar"})
     h7 = pabot.get_hash_of_command({
         "key": "value",
         "key2": "value2"
     }, {"testlevelsplit": True})
     self.assertEqual("97d170e1550eee4afc0af065b78cda302a97674c", h1)
     self.assertNotEqual(h1, h2)
     self.assertEqual(h2, h3)
     self.assertEqual(h2, h4)
     self.assertNotEqual(h2, h5)
     self.assertEqual(h5, h6)
     self.assertNotEqual(h6, h7)
Пример #3
0
 def test_hash_of_command(self):
     h1 = pabot.get_hash_of_command({}, {})
     h2 = pabot.get_hash_of_command({"key":"value"}, {})
     h3 = pabot.get_hash_of_command({"key2": [], "key":"value"}, {})
     h4 = pabot.get_hash_of_command({"pythonpath":"foobarzoo", "key":"value"}, {})
     h5 = pabot.get_hash_of_command({"key":"value", "key2": "value2"}, {})
     h6 = pabot.get_hash_of_command({"key":"value", "key2": "value2"}, {"foo":"bar"})
     h7 = pabot.get_hash_of_command({"key":"value", "key2": "value2"}, {"testlevelsplit":True})
     self.assertEqual("97d170e1550eee4afc0af065b78cda302a97674c", h1)
     self.assertNotEqual(h1, h2)
     self.assertEqual(h2, h3)
     self.assertEqual(h2, h4)
     self.assertNotEqual(h2, h5)
     self.assertEqual(h5, h6)
     self.assertNotEqual(h6, h7)