def test_get_atom(self): atoms = [Atom(1, 'CA', '', 'A', 'ALA'), Atom(2, 'N', '', 'A', 'ALA')] residue = Residue('ALA', 1, atoms) atom1 = residue.get_atom('CA') atom2 = residue.get_atom('N') atom3 = residue.get_atom('CG') assert 'CA' == atom1.name assert 'N' == atom2.name assert None == atom3
def test_get_atom(self): atoms = [Atom(1, 'CA', '', 'A', 'ALA'), Atom(2, 'N', '', 'A', 'ALA')] residue = Residue('ALA', 1, atoms) atom1 = residue.get_atom('CA') atom2 = residue.get_atom('N') atom3 = residue.get_atom('CG') assert atom1.name == "CA" assert atom2.name == "N" assert atom3 is None