def test_add_redundant_experiment(self):

        #
        # Adding twice an experiment that already exists is not a problem
        #
        self.coordinator.add_experiment_instance_id("lab2:inst@machine", ExperimentInstanceId('inst2', 'exp1', 'cat1'), Resource("res_type", "res_inst2"))
        self.coordinator.add_experiment_instance_id("lab2:inst@machine", ExperimentInstanceId('inst2', 'exp1', 'cat1'), Resource("res_type", "res_inst2"))

        #
        # But saying that that experiment is handled by other lab server
        # is actually a problem
        #
        self.assertRaises(
                CoordExc.InvalidExperimentConfigError,
                self.coordinator.add_experiment_instance_id,
                "lab3:inst@machine",  # This is different
                ExperimentInstanceId('inst2', 'exp1', 'cat1'),
                Resource("res_type", "res_inst2")
            )

        #
        # Or saying that that experiment is bound to other resource instance
        #
        self.assertRaises(
                CoordExc.InvalidExperimentConfigError,
                self.coordinator.add_experiment_instance_id,
                "lab2:inst@machine",
                ExperimentInstanceId('inst2', 'exp1', 'cat1'),
                Resource("res_type", "res_inst3") # Now this is different
            )
Adding redundant experiments is not a problem, but adding the experiment
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/test/unit/weblab/core/coordinator/test_coordinator.py/AbstractCoordinatorTestCase.test_add_redundant_experiment