Back to index

python-biopython  1.60
Public Member Functions
test_Entrez.EPostTest Class Reference

List of all members.

Public Member Functions

def test_epost
def test_wrong
def test_invalid

Detailed Description

Tests for parsing XML output returned by EPost

Definition at line 1264 of file test_Entrez.py.


Member Function Documentation

Test parsing XML returned by EPost

Definition at line 1269 of file test_Entrez.py.

01269 
01270     def test_epost(self):
01271         '''Test parsing XML returned by EPost
01272         '''
01273         # To create the XML file, use
01274         # >>> Bio.Entrez.epost(db="pubmed", id="11237011")
01275         handle = open('Entrez/epost1.xml', "rb")
01276         record = Entrez.read(handle)
01277         handle.close()
01278         self.assertEqual(record["QueryKey"],  '1')
01279         self.assertEqual(record["WebEnv"], '0zYsuLk3zG_lRMkblPBEqnT8nIENUGw4HAy8xXChTnoVm7GEnWY71jv3nz@1FC077F3806DE010_0042SID')

Here is the call graph for this function:

Test parsing XML returned by EPost with an invalid id (overflow tag)

Definition at line 1289 of file test_Entrez.py.

01289 
01290     def test_invalid(self):
01291         '''Test parsing XML returned by EPost with an invalid id (overflow tag)
01292         '''
01293         # To create the XML file, use
01294         # >>> Bio.Entrez.epost(db="pubmed", id=99999999999999999999999999999999)
01295         handle = open('Entrez/epost3.xml', "rb")
01296         record = Entrez.read(handle)
01297         handle.close()
01298         self.assertEqual(record["InvalidIdList"], ["-1"])
01299         self.assertEqual(record["QueryKey"], "1")
01300         self.assertEqual(record["WebEnv"], "08AIUeBsfIk6BfdzKnd3GM2RtCudczC9jm5aeb4US0o7azCTQCeCsr-xg0@1EDE54E680D03C40_0011SID")
01301 

Here is the call graph for this function:

Test parsing XML returned by EPost with incorrect arguments

Definition at line 1280 of file test_Entrez.py.

01280 
01281     def test_wrong(self):
01282         '''Test parsing XML returned by EPost with incorrect arguments
01283         '''
01284         # To create the XML file, use
01285         # >>> Bio.Entrez.epost(db="nothing")
01286         handle = open('Entrez/epost2.xml', "rb")
01287         self.assertRaises(RuntimeError, Entrez.read, handle)
01288         handle.close()

Here is the call graph for this function:


The documentation for this class was generated from the following file: