Example #1
0
 def test_get_options_from_ini_no_ini_path_no_target(self):
     # Test that no config options are loaded when no ini path or target
     # directory are provided
     self.assertIsNone(bandit._get_options_from_ini(None, []))
Example #2
0
 def test_get_options_from_ini_no_ini_path_no_bandit_files(self):
     # Test that no config options are loaded when no ini path is provided
     # and the target directory contains no bandit config files (.bandit)
     target_directory = self.useFixture(fixtures.TempDir()).path
     self.assertIsNone(
         bandit._get_options_from_ini(None, [target_directory]))
Example #3
0
 def test_get_options_from_ini_empty_directory_no_target(self):
     # Test that no config options are loaded when an empty directory is
     # provided as the ini path and no target directory is provided
     ini_directory = self.useFixture(fixtures.TempDir()).path
     self.assertIsNone(bandit._get_options_from_ini(ini_directory, []))
Example #4
0
 def test_get_options_from_ini_no_ini_path_no_target(self):
     # Test that no config options are loaded when no ini path or target
     # directory are provided
     self.assertIsNone(bandit._get_options_from_ini(None, []))
Example #5
0
 def test_get_options_from_ini_no_ini_path_no_bandit_files(self):
     # Test that no config options are loaded when no ini path is provided
     # and the target directory contains no bandit config files (.bandit)
     target_directory = self.useFixture(fixtures.TempDir()).path
     self.assertIsNone(bandit._get_options_from_ini(None,
                       [target_directory]))
Example #6
0
 def test_get_options_from_ini_empty_directory_no_target(self):
     # Test that no config options are loaded when an empty directory is
     # provided as the ini path and no target directory is provided
     ini_directory = self.useFixture(fixtures.TempDir()).path
     self.assertIsNone(bandit._get_options_from_ini(ini_directory, []))