def test_valid_config(self):
     config = {
         "vol-fake1111": {"max_snapshots": 5, "interval": "daily"},
         "vol-fake2222": {"interval": "hourly"},
         "vol-fake3333": {"max_snapshots": 3},
         "vol-fake4444": {},
     }
     FileBackupConfig._validate_config(config)
 def test_valid_config(self):
     config = {
         "vol-fake1111": {
             "max_snapshots": 5,
             "interval": "daily"
         },
         "vol-fake2222": {
             "interval": "hourly"
         },
         "vol-fake3333": {
             "max_snapshots": 3
         },
         "vol-fake4444": {},
     }
     FileBackupConfig._validate_config(config)
    def test_errors_on_invalid_config(self):
        with self.assertRaises(AssertionError):
            FileBackupConfig._validate_config("")

        with self.assertRaises(ValidationError):
            FileBackupConfig._validate_config({"some_other": "dict"})
    def test_errors_on_invalid_config(self):
        with self.assertRaises(AssertionError):
            FileBackupConfig._validate_config("")

        with self.assertRaises(ValidationError):
            FileBackupConfig._validate_config({"some_other": "dict"})