Ejemplo n.º 1
0
 def test_jar_none(self):
     error, filename = deploy.find_files_from_list(".", ['john.jar'],
                                                   "pre_bob", "post_bob")
     self.assertEqual(
         "Could not find file starting with 'pre_bob' and ending with 'post_bob' in path '.'.",
         error)
     self.assertIsNone(filename)
Ejemplo n.º 2
0
 def test_many_prefix2(self):
     error, filename = deploy.find_files_from_list(
         ".", ['john.jar', 'bob-1.0.0.jar', 'john2.jar'], "john", None)
     self.assertIsNone(error)
     self.assertEqual(['john.jar', 'john2.jar'], filename)
Ejemplo n.º 3
0
 def test_single_prefix(self):
     error, filename = deploy.find_files_from_list(".", ['bob-1.0.0.jar'],
                                                   "bob", None)
     self.assertIsNone(error)
     self.assertEqual(["bob-1.0.0.jar"], filename)
Ejemplo n.º 4
0
 def test_two_postfix_mismatch(self):
     error, filename = deploy.find_files_from_list(
         ".", ['bob-1.0.0.jar', 'bob.jar'], None, "bob")
     self.assertEqual("Could not find file ending with 'bob' in path '.'.",
                      error)
     self.assertIsNone(filename)
Ejemplo n.º 5
0
 def test_single_postfix(self):
     error, filename = deploy.find_files_from_list(".", ['bob.jar'], None,
                                                   ".jar")
     self.assertIsNone(error)
     self.assertEqual(["bob.jar"], filename)