示例#1
0
 def test_xml_data_is_output(self):
     info = DrugInfo()
     info.search('combivir', output_format=None)
     self.assertFalse(api.xml2dict.called)
示例#2
0
 def test_xml_data_is_output(self):
     info = DrugInfo()
     info.search('combivir', output_format=None)
     self.assertFalse(api.xml2dict.called)
示例#3
0
 def test_url_called_for_combivir(self):
     info = DrugInfo()
     info.search('combivir')
     expected_url = ('http://aidsinfo.nih.gov/DrugsNew/drug.aspx?'
                     'displayxml=true&name=combivir')
     api.urlopen.assert_called_with(expected_url)
示例#4
0
 def test_url_called_for_combivir(self):
     info = DrugInfo()
     info.search('combivir')
     expected_url = ('http://aidsinfo.nih.gov/DrugsNew/drug.aspx?'
                     'displayxml=true&name=combivir')
     api.urlopen.assert_called_with(expected_url)