Index: /branches/ipp-259_genericise_backups/tools/backups/backup.py
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/backup.py	(revision 40943)
+++ /branches/ipp-259_genericise_backups/tools/backups/backup.py	(revision 40944)
@@ -29,10 +29,12 @@
 
         config = ConfigParser()
+        expected_class = configparser.ConfigParser
         if config_class_or_filepath is None:
-            raise errs.ConfigError(config_class_or_filepath, "Neither config settings or filepath of config given")
-        elif isinstance(config_class_or_filepath, configparser.ConfigParser):
+            raise errs.ValidationError("ValidationError: config settings or filepath to config must be given")
+        elif isinstance(config_class_or_filepath, expected_class):
             config = config_class_or_filepath
-        elif path.exists(config_class_or_filepath):
-            config.read(config_class_or_filepath)
+        elif not path.exists(config_class_or_filepath):
+            raise errs.ValidationError(f"ValidationError: Config filepath does not exist (or incorrect class given, expected: {expected_class})")
+        config.read(config_class_or_filepath)
 
         self.read_default_section(config)
Index: /branches/ipp-259_genericise_backups/tools/backups/backup_test.py
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/backup_test.py	(revision 40943)
+++ /branches/ipp-259_genericise_backups/tools/backups/backup_test.py	(revision 40944)
@@ -103,12 +103,15 @@
     def test_failure_if_no_defaults_provided(self):
         config = ConfigParser()
-        with pytest.raises(errs.ConfigError):
+        with pytest.raises(errs.ConfigError) as e_empty:
             Backup(config_file=config)
-
-        with pytest.raises(errs.ValidationError):
+        assert "is required but was not found in config" in str(e_empty)
+
+        with pytest.raises(errs.ValidationError) as e_none:
             Backup(config_file=None)
-
-        with pytest.raises(errs.ConfigError):
+        assert "ValidationError: Backup class must be given a config" in str(e_none)
+
+        with pytest.raises(errs.ValidationError) as e_nofile:
             Backup(config_file="/not/a/real/file.config")
+        assert "ValidationError: Config filepath does not exist" in str(e_nofile)
 
     def test_nothing_should_be_set_to_run_if_not_present(self, tmpdir):
Index: anches/ipp-259_genericise_backups/tools/backups/confluence_backup.config
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/confluence_backup.config	(revision 40943)
+++ 	(revision )
@@ -1,23 +1,0 @@
-[DEFAULT]
-backup_paths =  /export/ippops4.0/atlassian_backups,
-    /data/ippops3.0/atlassian_backups,
-    /data/ippops5.0/atlassian_backups
-source_machine = ippops4
-verbose = False
-
-[COPY]
-sources = /var/atlassian/application-data/confluence/export
-additional_args = -v
-
-[TAR]
-sources = /var/atlassian/application-data/confluence/data
-additional_args = --verbose -z -p -cf
-target_filename = confluence.tar.gz
-prefix_date = True
-
-[MYSQLDUMP]
-user = dumper
-password = not_a_real_password
-db_name = confluencedb
-target_filename = confluence_mysqldump.sql
-prefix_date = True
Index: /branches/ipp-259_genericise_backups/tools/backups/confluence_backup.py
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/confluence_backup.py	(revision 40943)
+++ /branches/ipp-259_genericise_backups/tools/backups/confluence_backup.py	(revision 40944)
@@ -8,10 +8,10 @@
 from backups.backup import Backup
 
-DEFAULT_CONFIG_FILE = path.join(path.dirname(__file__), 'confluence_backup.config')
+EXPECTED_CONFIG_FILE = path.join(path.dirname(__file__), './confluence_backup.config')
 
 
 class ConfluenceBackup(Backup):
 
-    def __init__(self, config_file=DEFAULT_CONFIG_FILE):
+    def __init__(self, config_file=EXPECTED_CONFIG_FILE):
         self.load_config(config_file)
 
@@ -69,5 +69,5 @@
         nargs='?',
         help='specify the location of a config that matches the ConfigSchema',
-        default=DEFAULT_CONFIG_FILE)
+        default=EXPECTED_CONFIG_FILE)
 
     return parser.parse_args()
Index: /branches/ipp-259_genericise_backups/tools/backups/confluence_backup_test.py
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/confluence_backup_test.py	(revision 40943)
+++ /branches/ipp-259_genericise_backups/tools/backups/confluence_backup_test.py	(revision 40944)
@@ -12,5 +12,5 @@
 
 
-JIRA_TEST_CONFIG = os.path.join(os.path.dirname(__file__), './testing/confluence_test.config')
+CONF_TEST_CONFIG = os.path.join(os.path.dirname(__file__), './testing/confluence_test.config')
 
 
@@ -113,15 +113,17 @@
 
     def test_load_from_config_file(self):
-        jb = ConfluenceBackup(config_file=JIRA_TEST_CONFIG)
+        jb = ConfluenceBackup(config_file=CONF_TEST_CONFIG)
         self.assert_defaults(jb)
 
-    def test_default_config_loads_with_no_args(self):
-        default_config = jbck_mod.DEFAULT_CONFIG_FILE
-        assert os.path.exists(default_config)
-        jb = ConfluenceBackup()
-        self.assert_defaults(jb)
+    def test_default_config_fails_to_load_if_the_file_does_not_exist(self):
+        default_config = jbck_mod.EXPECTED_CONFIG_FILE
+        assert not os.path.exists(default_config)
+
+        with pytest.raises(errs.ValidationError) as e:
+            ConfluenceBackup()
+        assert "ValidationError: Config filepath does not exist" in str(e)
 
     def test_default_arguments(self):
-        jb = ConfluenceBackup(config_file=JIRA_TEST_CONFIG)
+        jb = ConfluenceBackup(config_file=CONF_TEST_CONFIG)
         self.assert_defaults(jb)
 
@@ -166,11 +168,12 @@
 
     def test_nonexistant_config_file_raises_error(self):
-        with pytest.raises(errs.ConfigError):
+        with pytest.raises(errs.ValidationError) as e:
             ConfluenceBackup("not a real file path")
+        assert "ValidationError: Config filepath does not exist" in str(e)
 
     def test_main_loads_default_and_fails_due_to_missing_paths(self):
         with pytest.raises(errs.ValidationError) as e:
             jbck_mod.main()
-        assert "ValidationError: target path does not exist:" in str(e)
+        assert "ValidationError: Config filepath does not exist" in str(e)
 
 
@@ -180,5 +183,5 @@
 
     def test_get_confluence_backup_date_format(self):
-        jb = ConfluenceBackup(config_file=JIRA_TEST_CONFIG)
+        jb = ConfluenceBackup(config_file=CONF_TEST_CONFIG)
         today = datetime.date.today()
         expected_format = today.strftime("%Y_%m_%d")
@@ -190,5 +193,5 @@
 
     def test_copying_fails_if_paths_not_present(self):
-        jb = ConfluenceBackup(config_file=JIRA_TEST_CONFIG)
+        jb = ConfluenceBackup(config_file=CONF_TEST_CONFIG)
         # return_value = jb._copy_confluence_backup()
         with pytest.raises(ValidationError) as e:
Index: anches/ipp-259_genericise_backups/tools/backups/fixture_test.py
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/fixture_test.py	(revision 40943)
+++ 	(revision )
@@ -1,37 +1,0 @@
-import pytest
-
-
-@pytest.fixture
-def mr_fixture():
-
-    ab = {}
-
-    def _add_to_dict():
-        return ab.update({"hiya": 12})
-
-    def _add_more_to_dict():
-        return ab.update({"bonjour": 13})
-
-    def _full_creation():
-        _add_to_dict()
-        _add_more_to_dict()
-        print(ab)
-        return ab
-
-    yield _full_creation()
-
-    def _full_removal():
-        ab = {}
-        print(ab)
-
-    _full_removal()
-
-
-class TestFixtures(object):
-
-    def test_loading_fixture(self, mr_fixture):
-        ab = mr_fixture
-        print(mr_fixture)
-        type(mr_fixture)
-        assert ab["hiya"] == 12
-        assert ab["bonjour"] == 13
Index: anches/ipp-259_genericise_backups/tools/backups/full_atlassian_backup_test.py
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/full_atlassian_backup_test.py	(revision 40943)
+++ 	(revision )
@@ -1,146 +1,0 @@
-import datetime
-import os
-import backup_atlassian_applications as baa
-
-from pathlib import Path
-
-from backup_atlassian_applications import AtlassianBackups
-
-def create_all_paths_and_folders(ab_class: AtlassianBackups, tmpdir) -> AtlassianBackups:
-    """This creates all paths and files needed for thorough testing of the
-atlassian backup class. The class returned will have all the paths set too.
-Assertions are made that the files exist and they are set on the class object.
-
-    The directory strucutre is as follows:
-
-    tmpdir/host_backup/latest/2019-09-01_jira_prev_latest_file.zip
-                             /2019_09_01_conf_prev_latest_file.zip
-          /backup_1/old/2019-08-13_jira_old_file.zip
-                       /2019_08_13_conf_old_file.zip
-          /backup_2/latest/2019-09-01_jira_prev_latest_file.zip
-                          /2019_09_01_conf_prev_latest_file.zip
-                   /old/2019-08-13_jira_old_file.zip
-                       /2019_08_13_conf_old_file.zip
-                   /tmp
-
-    # Directories where the original files come from (date will be todays)
-    tmpdir/jira_home/zip_in_here/2019-11-23_jira_test_file.zip
-                    /attachments/attachment_1.zip
-                    /attachments/attachment_2.txt
-    tmpdir/conf_home/zip_in_here/2019_11_23_conf_test_file.zip
-                    /attachments/attachment_1.zip
-                    /attachments/attachment_2.txt
-
-"""
-
-    # Create all main paths required
-    host_backup_path = os.path.join(tmpdir, "host_backup")
-    backup_1_path = os.path.join(tmpdir, "backup_1")
-    backup_2_path = os.path.join(tmpdir, "backup_2")
-    jira_backup_path = os.path.join(tmpdir, "jira_home", "zip_in_here")
-    conf_backup_path = os.path.join(tmpdir, "conf_home", "zip_in_here")
-    jira_attachments_path = os.path.join(tmpdir, "jira_home", "attachments")
-    conf_attachments_path = os.path.join(tmpdir, "conf_home", "attachments")
-    os.makedirs(host_backup_path)
-    os.makedirs(backup_1_path)
-    os.makedirs(backup_2_path)
-    os.makedirs(jira_backup_path)
-    os.makedirs(conf_backup_path)
-    os.makedirs(jira_attachments_path)
-    os.makedirs(conf_attachments_path)
-    assert os.path.exists(host_backup_path)
-    assert os.path.exists(backup_1_path)
-    assert os.path.exists(backup_2_path)
-    assert os.path.exists(jira_backup_path)
-    assert os.path.exists(conf_backup_path)
-    assert os.path.exists(jira_attachments_path)
-    assert os.path.exists(conf_attachments_path)
-
-    # And the some of the subdirs (only one of the backups has all of them)
-    os.makedirs(os.path.join(host_backup_path, "latest"))
-    os.makedirs(os.path.join(backup_1_path, "old"))
-    os.makedirs(os.path.join(backup_2_path, "old"))
-    os.makedirs(os.path.join(backup_2_path, "tmp"))
-    os.makedirs(os.path.join(backup_2_path, "latest"))
-    assert os.path.exists(os.path.join(host_backup_path, "latest"))
-    assert os.path.exists(os.path.join(backup_1_path, "old"))
-    assert os.path.exists(os.path.join(backup_2_path, "old"))
-    assert os.path.exists(os.path.join(backup_2_path, "tmp"))
-    assert os.path.exists(os.path.join(backup_2_path, "latest"))
-
-    # set them on the class
-    ab_class.host_backup_path = host_backup_path
-    ab_class.backup_1_path = backup_1_path
-    ab_class.backup_2_path = backup_2_path
-    ab_class.jira_backup_path = jira_backup_path
-    ab_class.conf_backup_path = conf_backup_path
-    ab_class.jira_attachments_path = jira_attachments_path
-    ab_class.conf_attachments_path = conf_attachments_path
-
-    # Create backup files
-    jira_backup_name = ab_class.get_jira_backup_date_format() + "_jira_test_file.zip"
-    jira_backup_filepath = os.path.join(jira_backup_path, jira_backup_name)
-    Path(jira_backup_filepath).touch()
-    assert os.path.exists(jira_backup_filepath)
-
-    conf_backup_name = ab_class.get_confluence_backup_date_format() + "_conf_test_file.zip"
-    conf_backup_filepath = os.path.join(conf_backup_path, conf_backup_name)
-    Path(conf_backup_filepath).touch()
-    assert os.path.exists(conf_backup_filepath)
-
-    # Create some files that are attchments
-    jira_attachment_1_name = "attachment_1.zip"
-    jira_attachment_2_name = "attachment_2.txt"
-    jira_attachment_1_filepath = os.path.join(jira_attachments_path, jira_attachment_1_name)
-    jira_attachment_2_filepath = os.path.join(jira_attachments_path, jira_attachment_2_name)
-    Path(jira_attachment_1_filepath).touch()
-    Path(jira_attachment_2_filepath).touch()
-    assert os.path.exists(jira_attachment_1_filepath)
-    assert os.path.exists(jira_attachment_2_filepath)
-
-    conf_attachment_1_name = "attachment_1.zip"
-    conf_attachment_2_name = "attachment_2.txt"
-    conf_attachment_1_filepath = os.path.join(conf_attachments_path, conf_attachment_1_name)
-    conf_attachment_2_filepath = os.path.join(conf_attachments_path, conf_attachment_2_name)
-    Path(conf_attachment_1_filepath).touch()
-    Path(conf_attachment_2_filepath).touch()
-    assert os.path.exists(conf_attachment_1_filepath)
-    assert os.path.exists(conf_attachment_2_filepath)
-
-    # Have some old and latest versions in the backup dirs:
-    old_date = datetime.date(2019, 8, 13)
-    latest_date = datetime.date(2019, 9, 1)
-    jira_old_backup_name    = ab_class.get_jira_backup_date_format(old_date)          + "_jira_old_file.zip"
-    jira_latest_backup_name = ab_class.get_jira_backup_date_format(latest_date)       + "_jira_prev_latest_file.zip"
-    conf_old_backup_name    = ab_class.get_confluence_backup_date_format(old_date)    + "_conf_old_file.zip"
-    conf_latest_backup_name = ab_class.get_confluence_backup_date_format(latest_date) + "_conf_prev_latest_file.zip"
-
-    def assert_not_create_assert_exists(root_path, subdir, filename):
-        filepath = os.path.join(root_path, subdir, filename)
-        assert not os.path.exists(filepath)
-        Path(filepath).touch()
-        assert os.path.exists(filepath)
-
-    assert_not_create_assert_exists(host_backup_path, "latest", jira_latest_backup_name)
-    assert_not_create_assert_exists(host_backup_path, "latest", conf_latest_backup_name)
-    assert_not_create_assert_exists(backup_1_path,    "old",    jira_old_backup_name)
-    assert_not_create_assert_exists(backup_1_path,    "old",    conf_old_backup_name)
-    assert_not_create_assert_exists(backup_2_path,    "old",    jira_old_backup_name)
-    assert_not_create_assert_exists(backup_2_path,    "old",    conf_old_backup_name)
-    assert_not_create_assert_exists(backup_2_path,    "latest", jira_latest_backup_name)
-    assert_not_create_assert_exists(backup_2_path,    "latest", conf_latest_backup_name)
-
-    return ab_class
-
-
-class TestEntireProcess(object):
-
-    def test_entire_process(self, tmpdir):
-        test_config_file = os.path.join(os.path.dirname(__file__), 'testing', 'test.config')
-
-        ab = AtlassianBackups(config_file=test_config_file)
-        ab = create_all_paths_and_folders(ab, tmpdir)
-
-        result = ab.perform_backups()
-
-        assert result == 0
Index: anches/ipp-259_genericise_backups/tools/backups/jira_backup.config
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/jira_backup.config	(revision 40943)
+++ 	(revision )
@@ -1,23 +1,0 @@
-[DEFAULT]
-backup_paths =  /export/ippops4.0/atlassian_backups,
-    /data/ippops3.0/atlassian_backups,
-    /data/ippops5.0/atlassian_backups
-source_machine = ippops4
-verbose = False
-
-[COPY]
-sources = /var/atlassian/application-data/jira/export
-additional_args = -v
-
-[TAR]
-sources = /var/atlassian/application-data/jira/data
-additional_args = --verbose -z -p -cf
-target_filename = jira.tar.gz
-prefix_date = True
-
-[MYSQLDUMP]
-user = dumper
-password = not_a_real_password
-db_name = jiradb
-target_filename = jira_mysqldump.sql
-prefix_date = True
Index: /branches/ipp-259_genericise_backups/tools/backups/jira_backup.py
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/jira_backup.py	(revision 40943)
+++ /branches/ipp-259_genericise_backups/tools/backups/jira_backup.py	(revision 40944)
@@ -8,10 +8,10 @@
 from backups.backup import Backup
 
-DEFAULT_CONFIG_FILE = path.join(path.dirname(__file__), 'jira_backup.config')
+EXPECTED_CONFIG_FILE = path.join(path.dirname(__file__), './jira_backup.config')
 
 
 class JiraBackup(Backup):
 
-    def __init__(self, config_file=DEFAULT_CONFIG_FILE):
+    def __init__(self, config_file=EXPECTED_CONFIG_FILE):
         self.load_config(config_file)
 
@@ -69,5 +69,5 @@
         nargs='?',
         help='specify the location of a config that matches the ConfigSchema',
-        default=DEFAULT_CONFIG_FILE)
+        default=EXPECTED_CONFIG_FILE)
 
     return parser.parse_args()
Index: /branches/ipp-259_genericise_backups/tools/backups/jira_backup_test.py
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/jira_backup_test.py	(revision 40943)
+++ /branches/ipp-259_genericise_backups/tools/backups/jira_backup_test.py	(revision 40944)
@@ -116,9 +116,11 @@
         self.assert_defaults(jb)
 
-    def test_default_config_loads_with_no_args(self):
-        default_config = jbck_mod.DEFAULT_CONFIG_FILE
-        assert os.path.exists(default_config)
-        jb = JiraBackup()
-        self.assert_defaults(jb)
+    def test_default_config_fails_to_load_if_the_file_does_not_exist(self):
+        default_config = jbck_mod.EXPECTED_CONFIG_FILE
+        assert not os.path.exists(default_config)
+
+        with pytest.raises(errs.ValidationError) as e:
+            JiraBackup()
+        assert "ValidationError: Config filepath does not exist" in str(e)
 
     def test_default_arguments(self):
@@ -166,11 +168,12 @@
 
     def test_nonexistant_config_file_raises_error(self):
-        with pytest.raises(errs.ConfigError):
+        with pytest.raises(errs.ValidationError) as e:
             JiraBackup("not a real file path")
+        assert "ValidationError: Config filepath does not exist" in str(e)
 
     def test_main_loads_default_and_fails_due_to_missing_paths(self):
         with pytest.raises(errs.ValidationError) as e:
             jbck_mod.main()
-        assert "ValidationError: target path does not exist:" in str(e)
+        assert "ValidationError: Config filepath does not exist" in str(e)
 
 
Index: anches/ipp-259_genericise_backups/tools/backups/testing/full_backup_config.config
===================================================================
--- /branches/ipp-259_genericise_backups/tools/backups/testing/full_backup_config.config	(revision 40943)
+++ 	(revision )
@@ -1,35 +1,0 @@
-[DEFAULT]
-backup_paths =  /export/ippops4.0/atlassian_backups,
-    /data/ippops3.0/atlassian_backups,
-    /data/ippops5.0/atlassian_backups
-source_machine = hostname_of_computer
-verbose = True
-
-[COPY]
-sources = /some_dir_to_copy_from/,
-          /some_dir/and_specific_file.jpeg
-additional_args = -v
-
-[TAR]
-sources = /this_dir/,
-          /another_dir/,
-          /and_a_couple_files/subdir/file1.txt,
-          /and_a_couple_files/subdir/file2.png,
-          /and_a_couple_files/subdir/file3.pdf
-additional_args = --verbose -z -p
-target_filename = cool_tar
-prefix_date = True
-
-
-[RSYNC]
-sources = /dir/to/sync
-additional_args = --progress -r
-
-[MYSQLDUMP]
-user = dumper
-password = not_a_real_password
-db_name = jiradb
-additional_args =
-target_filename = itsa_mysqldump
-prefix_date = True
-
