- Timestamp:
- Oct 14, 2019, 4:59:32 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ipp-259_genericise_backups/tools/backups/backup_test.py
r40937 r40944 103 103 def test_failure_if_no_defaults_provided(self): 104 104 config = ConfigParser() 105 with pytest.raises(errs.ConfigError) :105 with pytest.raises(errs.ConfigError) as e_empty: 106 106 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: 109 110 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: 112 114 Backup(config_file="/not/a/real/file.config") 115 assert "ValidationError: Config filepath does not exist" in str(e_nofile) 113 116 114 117 def test_nothing_should_be_set_to_run_if_not_present(self, tmpdir):
Note:
See TracChangeset
for help on using the changeset viewer.
