예제 #1
0
 def test_profile_to_json_data_staging(self):
     api = BatsimJobProfileAPI.get_data_staging("src", "dest", 10)
     p = DataStagingJobProfile("p", 10, "src", "dest")
     jsn = Converters.profile_to_json(p)
     assert api == jsn
예제 #2
0
    def test_profile_to_json_invalid_type_must_raise(self):
        class NewJobProfile(JobProfile):
            pass

        with pytest.raises(NotImplementedError):
            Converters.profile_to_json(NewJobProfile("p"))
예제 #3
0
 def test_profile_to_json_parallel_homogeneous_pfs(self):
     api = BatsimJobProfileAPI.get_parallel_homogeneous_pfs("nfs", 1, 1)
     p = ParallelHomogeneousPFSJobProfile("p", 1, 1, "nfs")
     jsn = Converters.profile_to_json(p)
     assert api == jsn
예제 #4
0
 def test_profile_to_json_composed(self):
     api = BatsimJobProfileAPI.get_composed(1, ["1", "2"])
     p = ComposedJobProfile("p", ["1", "2"], 1)
     jsn = Converters.profile_to_json(p)
     assert api == jsn
예제 #5
0
 def test_profile_to_json_parallel_homogeneous_total(self):
     api = BatsimJobProfileAPI.get_parallel_homogeneous_total(10, 10)
     p = ParallelHomogeneousTotalJobProfile("p", 10, 10)
     jsn = Converters.profile_to_json(p)
     assert api == jsn
예제 #6
0
 def test_profile_to_json_parallel(self):
     api = BatsimJobProfileAPI.get_parallel(10)
     p = ParallelJobProfile("p", api["cpu"], api["com"])
     jsn = Converters.profile_to_json(p)
     assert api == jsn
예제 #7
0
 def test_profile_to_json_delay(self):
     api = BatsimJobProfileAPI.get_delay(10)
     p = DelayJobProfile("p", 10)
     jsn = Converters.profile_to_json(p)
     assert api == jsn