def test_xml_data_is_output(self):
     info = DrugInfo()
     info.search('combivir', output_format=None)
     self.assertFalse(api.xml2dict.called)
Exemple #2
0
 def test_xml_data_is_output(self):
     info = DrugInfo()
     info.search('combivir', output_format=None)
     self.assertFalse(api.xml2dict.called)
 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)
Exemple #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)