def test_with_empty(self): """Testing validate_site_paths with empty list""" expected_message = \ "You'll need to provide a site directory to run this command." with self.assertRaisesMessage(MissingSiteError, expected_message): validate_site_paths([]) with self.assertRaisesMessage(MissingSiteError, expected_message): validate_site_paths(None)
def test_with_missing_site_and_require_exists_false(self): """Testing validate_site_paths with missing site and require_exists=False """ # This should not raise. validate_site_paths(['/test'], require_exists=False)
def test_with_missing_site(self): """Testing validate_site_paths with missing site""" expected_message = 'The site directory "/test" does not exist.' with self.assertRaisesMessage(MissingSiteError, expected_message): validate_site_paths(['/test'])
def test_with_valid_sites(self): """Testing validate_site_paths with valid sites""" # This should not raise. validate_site_paths([os.path.dirname(__file__)])