예제 #1
0
  def test_has_url_if_queue_not_empty(self):
    urls = ['http://docs.python-guide.org/en/latest/writing/tests/']
    queuesystem.storeUrlsToQueue(urls)
    self.assertEqual(queuesystem.hasNextUrl(), True)

    queuesystem.clearQueue()
예제 #2
0
 def test_fetch_next_url(self):
   urls = ['https://docs.python.org/2/library/queue.html']
   queuesystem.storeUrlsToQueue(urls)
   self.assertEqual(queuesystem.nextUrl(), urls[0])
   queuesystem.clearQueue()