Пример #1
0
 def test_init_data(self):
     """DbRefs init with data should produce expected results"""
     d = DbRefs({"GenBank": "ab", "GO": (3, 44), "PDB": ["asdf", "ghjk"]})
     self.assertEqual(d, {
         "GenBank": ["ab"],
         "GO": [3, 44],
         "PDB": ["asdf", "ghjk"]
     })
     d.GenBank = "xyz"
     self.assertEqual(d["GenBank"], ["xyz"])
Пример #2
0
 def test_init_empty(self):
     """Info empty init should work as expected"""
     d = Info()
     self.assertEqual(len(d), 1)
     self.assertContains(d, "Refs")
     self.assertEqual(d.Refs, DbRefs())
     self.assertTrue(isinstance(d.Refs, DbRefs))
Пример #3
0
 def test_init_empty(self):
     """DbRefs empty init should work as expected"""
     self.assertEqual(DbRefs(), {})