def test_validate_uuid_invalid(self, mock_conn): with mock.patch.dict('src.etl.rds.CONFIG', self.config): rds = RDS() mock_conn.assert_called_once() with self.assertRaises(ValidationException, msg="Should throw an exception on invalid UUID."): rds.validate_uuid("This is not a uuid")
def test_validate_uuid_missing(self, mock_conn): with mock.patch.dict('src.etl.rds.CONFIG', self.config): rds = RDS() mock_conn.assert_called_once() with self.assertRaises(ValidationException, msg="Should throw an exception on a uuid missing in the URL."): rds.validate_uuid("")
def test_validate_uuid(self, mock_conn): with mock.patch.dict('src.etl.rds.CONFIG', self.config): rds = RDS() mock_conn.assert_called_once() rds.validate_uuid("0074973a-c377-472f-9f3c-f093fdc18836") self.assertTrue(True, "Should not throw an exception on a valid UUID.")