示例#1
0
 def test_prepend_plugin_validates_blacklisted_filename(self):
     """A blacklisted should not validate"""
     self.assertEqual(validate.validate_archive(self.PLUGIN_PREPENDED_PATH, 'basecomm'), True)
示例#2
0
 def test_blacklisted_file_does_not_validate(self):
     """A blacklisted should not validate"""
     self.assertEqual(validate.validate_archive(self.BLACKLISTED_PATH, 'basecomm'),
         [('./addons/sourcemod/scripting/basecomm.sp', 'Blacklisted path')])
示例#3
0
 def test_valid_source_with_correct_plugin_name_does_not_validate(self):
     """Valid source archive unsuccessfully passes validation when wrong plug-in name passed in"""
     self.assertEqual(validate.validate_archive(self.VALID_SOURCE_PATH, 'not_test'),
         [('./addons/sourcemod/scripting/test.sp', 'Invalid path')])
示例#4
0
 def test_invalid_filetype_does_not_validate(self):
     """A file with the wrong filetype should not validate"""
     self.assertEqual(validate.validate_archive(self.INVALID_TYPE_PATH, 'who_cares'),
         [('./addons/sourcemod/scripting/not_the_right_file_type.blank', 'Invalid path')])
示例#5
0
 def test_valid_source_with_correct_plugin_name_validates(self):
     """Valid source archive successfully passes validation"""
     self.assertTrue(validate.validate_archive(self.VALID_SOURCE_PATH, 'test'))