예제 #1
0
 def test_graphite_context(self):
     pub = job_clustering_publisher.JobClusteringPublisher(config_pub)
     output = pub.graphite_context(valid_datablock)
     assert output[0] == "hepcloud.de.glideinwms"
     assert output[1].get("group_1.job_cluster") == 2
     assert output[1].get("group_2.job_cluster") == 1
     assert output[1].get("group_3.job_cluster") == 2
     assert output[1].get("group_4.job_cluster") == 1
     assert output[1].get("group_5.job_cluster") == 1
 def test_graphite_context(self):
     pub = job_clustering_publisher.JobClusteringPublisher(config_pub)
     output = pub.graphite_context(valid_datablock)
     #pprint.pprint(output)
     assert output[0] == "hepcloud.de.glideinwms"
     #assert output[1].get("VO_Name=='cms'_and_RequestCpus==1_and_(MaxWallTimeMins>0_and_MaxWallTimeMins<=_60*12).job_cluster") == 2
     assert output[1].get('group_1.job_cluster') == 2
     assert output[1].get('group_2.job_cluster') == 1
     assert output[1].get('group_3.job_cluster') == 2
     assert output[1].get('group_4.job_cluster') == 1
     assert output[1].get('group_5.job_cluster') == 1
예제 #3
0
 def test_consumes(self):
     pub = job_clustering_publisher.JobClusteringPublisher(config_pub)
     assert pub._consumes == {"job_clusters": pandas.DataFrame}
 def test_consumes(self):
     consumes = ['job_clusters']
     pub = job_clustering_publisher.JobClusteringPublisher(config_pub)
     assert pub.consumes() == consumes