def test_command_search_transcripts_no_titles(self): excepted_output = ( "This function needs a dictionary of comic titles." " Please see the documentation of the program for" " more info." ) old_titles = xkcd.titles_location xkcd.titles_location = "AAA" output = xkcd.command_search_transcripts() xkcd.titles_location = old_titles self.assertEqual(output, excepted_output)
def test_command_search_transcripts_noargs(self): excepted_output = "Missing argument: query" output = xkcd.command_search_transcripts() self.assertEqual(output, excepted_output)
def test_command_search_transcripts(self): output = xkcd.command_search_transcripts("asdf") excepted_output = "Matches:\n(#1296) Git Commit\n" self.assertEqual(output, excepted_output)