Beispiel #1
0
 def test_complex_cast(self):
     nsl = NamedStarList(**(self.nsl_json_data))
     self.assertDiffs(
         nsl,
         SimpleDumper.cast(NamedStarList, self.nsl_json_data),
         {},
     )
Beispiel #2
0
 def test_visit_complex_filtered(self):
     nsl = NamedStarList(**(self.nsl_json_data))
     visited = SimpleDumper.visit(
         nsl,
         filter=tuple([x, 'hip_id'] for x in range(0, 3)),
     )
     self.assertEqual(
         visited,
         list({'hip_id': x['hip_id']}
              for x in self.acent_json_data['components']),
     )
Beispiel #3
0
 def test_complex_dump(self):
     nsl = NamedStarList(acent.components)
     nsl.name = "Alpha Centauri"
     dumped = SimpleDumper.visit(nsl)
     self.assertEqual(dumped, self.nsl_json_data)
Beispiel #4
0
 def test_complex_dump(self):
     nsl = NamedStarList(acent.components)
     nsl.name = "Alpha Centauri"
     dumped = SimpleDumper.visit(nsl)
     self.assertEqual(dumped, self.nsl_json_data)