示例#1
0
 def test_write_target_exposures_table(self):
     exposure = topic_helpers.exposure_coll1
     result = tbls.write_target_exposures(exposure, 1000)
     exposure_table = tbls.create_target_exposures(self.metadata)
     self.check_ordered_dict_to_table(result, exposure_table)
     self.assertEqual(result['exposureId'], exposure.exposureId)
     self.assertEqual(result['exposureNum'], exposure.exposureNum)
     self.assertEqual(result['exposureTime'], exposure.exposureTime)
     self.assertEqual(result['TargetHistory_targetId'], exposure.TargetHistory_targetId)
示例#2
0
 def test_create_target_exposures_table(self):
     exposure = tbls.create_target_exposures(self.metadata)
     self.assertEqual(len(exposure.c), 5)
     self.assertEqual(len(exposure.indexes), 2)