~sophie-middleton08/maus/devel

« back to all changes in this revision

Viewing changes to src/reduce/ReducePyHistogramTDCADCCounts/test_ReducePyHistogramTDCADCCounts.py

  • Committer: Chris Rogers
  • Date: 2012-04-16 13:33:25 UTC
  • mfrom: (659.1.17 release-candidate)
  • Revision ID: chris.rogers@stfc.ac.uk-20120416133325-11tyj7pb7xs7m37m
ReleaseĀ 0.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
        else:
328
328
            tag = "tdcadc"
329
329
        self.assertEquals(tag, image["tag"], "Unexpected tag")
330
 
        self.assertTrue("content" in image, "No content field")
 
330
        self.assertTrue("keywords" in image, "No keywords field")
 
331
        self.assertTrue("description" in image, "No description field")
331
332
        self.assertTrue("data" in image, "No data field")
332
333
        decoded_data = base64.b64decode(image["data"])
333
334
        self.assertTrue(decoded_data.find("EPS") != -1,
335
336
 
336
337
    def test_end_of_run(self):
337
338
        """
338
 
        Test "process" with a JSON document with an "END_OF_RUN"
339
 
        entry.
 
339
        Test "process" with a JSON document which is an end_of_run.
340
340
        @param self Object reference.
341
341
        """
342
 
        result = self.__process({"END_OF_RUN":"END_OF_RUN"})
 
342
        end_of_run = {"daq_data":None, "daq_event_type":"end_of_run", \
 
343
            "run_num":1, "spill_num":-1}
 
344
        result = self.__process(end_of_run)
343
345
        self.assertEquals({}, result, "Expected empty output spill")
344
346
 
345
347
    def tearDown(self):