def test_many_urls_should_print_first_results(self):
     sys.argv = ["unused_prog_name", xkcd_rss_xml, "excess"]
     main()
     self.assertStdoutEquals(xkcd_output + "\n")
 def test_should_get_one_URL_and_print_output(self):
     sys.argv = ["unused_prog_name", xkcd_rss_xml]
     main()
     self.assertStdoutEquals(xkcd_output + "\n")
 def test_no_urls_should_print_nothing(self):
     sys.argv = ["unused_prog_name"]
     main()
     self.assertStdoutEquals("")
示例#4
0
 def test_many_urls_should_print_first_results(self):
     sys.argv = ["unused_prog_name", xkcd_rss_xml, "excess"]
     main()
     self.assertStdoutEquals(printed_items + "\n")
示例#5
0
 def test_no_urls_should_print_nothing(self):
     sys.argv = ["unused_prog_name"]
     main()
     self.assertStdoutEquals("")
示例#6
0
 def test_should_get_one_URL_and_print_output(self):
     sys.argv = ["unused_prog_name", xkcd_rss_xml]
     main()
     self.assertStdoutEquals(printed_items + "\n")
示例#7
0
 def test_many_urls_should_print_first_results(self):
     sys.argv = ["unused_prog_name", "xkcd.rss.xml", "excess"]
     main()
     self.assertStdoutEquals(self.printed_items + "\n")
示例#8
0
 def test_should_get_one_URL_and_print_output(self):
     sys.argv = ["unused_prog_name", "xkcd.rss.xml"]
     main()
     self.assertStdoutEquals(self.printed_items + "\n")