def publisher_instance(): publisher = AWSFOMPublisher.AWSFOMPublisher({ "publish_to_graphite": False, "graphite_host": "fifemondata.fnal.gov", "graphite_port": 2104, "graphite_context": "hepcloud.aws", "output_file": OUTPUT_FILE, "channel_name": "test", }) yield publisher with contextlib.suppress(OSError): os.unlink(OUTPUT_FILE)
def setUp(self): self.publisher = AWSFOMPublisher.AWSFOMPublisher({ 'publish_to_graphite': False, 'graphite_host': 'fifemondata.fnal.gov', 'graphite_port': 2104, 'graphite_context': 'hepcloud.aws', 'output_file': OUTPUT_FILE })
def test_consumes(self): fom_p = AWSFOMPublisher.AWSFOMPublisher({ 'publish_to_graphite': False, 'graphite_host': 'fifemondata.fnal.gov', 'graphite_port': 2104, 'graphite_context': 'hepcloud.aws', 'output_file': 'AWS_figure_of_merit_pub.csv' }) assert fom_p.consumes() == consumes
def setUp(self): self.publisher = AWSFOMPublisher.AWSFOMPublisher({ "publish_to_graphite": False, "graphite_host": "fifemondata.fnal.gov", "graphite_port": 2104, "graphite_context": "hepcloud.aws", "output_file": OUTPUT_FILE, "channel_name": "test", })
def test_transform(self): fom_p = AWSFOMPublisher.AWSFOMPublisher({ 'publish_to_graphite': False, 'graphite_host': 'fifemondata.fnal.gov', 'graphite_port': 2104, 'graphite_context': 'hepcloud.aws', 'output_file': 'AWS_figure_of_merit_pub.csv' }) data_block = create_datablock() res = fom_p.publish(data_block) opd = pd.read_csv('AWS_figure_of_merit_pub.csv') assert opd.equals(expected_reply)