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"])
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))
def test_init_empty(self): """DbRefs empty init should work as expected""" self.assertEqual(DbRefs(), {})