IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 14, 2019, 4:59:32 PM (7 years ago)
Author:
fairlamb
Message:

Tidy up tests, and removed now unused files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ipp-259_genericise_backups/tools/backups/backup_test.py

    r40937 r40944  
    103103    def test_failure_if_no_defaults_provided(self):
    104104        config = ConfigParser()
    105         with pytest.raises(errs.ConfigError):
     105        with pytest.raises(errs.ConfigError) as e_empty:
    106106            Backup(config_file=config)
    107 
    108         with pytest.raises(errs.ValidationError):
     107        assert "is required but was not found in config" in str(e_empty)
     108
     109        with pytest.raises(errs.ValidationError) as e_none:
    109110            Backup(config_file=None)
    110 
    111         with pytest.raises(errs.ConfigError):
     111        assert "ValidationError: Backup class must be given a config" in str(e_none)
     112
     113        with pytest.raises(errs.ValidationError) as e_nofile:
    112114            Backup(config_file="/not/a/real/file.config")
     115        assert "ValidationError: Config filepath does not exist" in str(e_nofile)
    113116
    114117    def test_nothing_should_be_set_to_run_if_not_present(self, tmpdir):
Note: See TracChangeset for help on using the changeset viewer.