def test_json_to_profile_data_staging(self): api = BatsimJobProfileAPI.get_data_staging("src", "dest", 10) p = Converters.json_to_profile("p", api) assert isinstance(p, DataStagingJobProfile)
def test_json_to_profile_invalid_type_must_raise(self): api = BatsimJobProfileAPI.get_parallel_homogeneous_pfs("nfs", 1, 1) api["type"] = "NewType" with pytest.raises(NotImplementedError): Converters.json_to_profile("n", api)
def test_json_to_profile_parallel_homogeneous_pfs(self): api = BatsimJobProfileAPI.get_parallel_homogeneous_pfs("nfs", 1, 1) p = Converters.json_to_profile("p", api) assert isinstance(p, ParallelHomogeneousPFSJobProfile)
def test_json_to_profile_parallel_composed(self): api = BatsimJobProfileAPI.get_composed(1, ["1", "2"]) p = Converters.json_to_profile("p", api) assert isinstance(p, ComposedJobProfile)
def test_json_to_profile_parallel_homogeneous_total(self): api = BatsimJobProfileAPI.get_parallel_homogeneous_total(10, 10) p = Converters.json_to_profile("p", api) assert isinstance(p, ParallelHomogeneousTotalJobProfile)
def test_json_to_profile_parallel(self): api = BatsimJobProfileAPI.get_parallel(10) p = Converters.json_to_profile("p", api) assert isinstance(p, ParallelJobProfile)
def test_json_to_profile_delay(self): api = BatsimJobProfileAPI.get_delay(10) p = Converters.json_to_profile("p", api) assert isinstance(p, DelayJobProfile)