コード例 #1
0
 def test_url_matcher_matches_url_from_given_period(self):
     downloader = Downloader('')
     url = 'http://somedomain/2012/patent.zip'
     matched = downloader.url_matcher(url, 2012, 2013)
     assert matched
コード例 #2
0
 def test_url_matcher_matches_only_zip_files(self):
     downloader = Downloader('')
     url = 'http://somedomain/2012/patent.tgz'
     matched = downloader.url_matcher(url, 2012, 2013)
     assert not matched
コード例 #3
0
 def test_url_matcher_doesnt_match_url_out_of_given_period(self):
     downloader = Downloader('')
     url = 'http://somedomain/2011/patent.zip'
     matched = downloader.url_matcher(url, 2012, 2013)
     assert not matched
コード例 #4
0
 def test_url_matcher_matches_url_from_given_period(self):
     downloader = Downloader("")
     url = "http://somedomain/2012/patent.zip"
     matched = downloader.url_matcher(url, 2012, 2013)
     assert matched
コード例 #5
0
 def test_url_matcher_matches_only_zip_files(self):
     downloader = Downloader("")
     url = "http://somedomain/2012/patent.tgz"
     matched = downloader.url_matcher(url, 2012, 2013)
     assert not matched
コード例 #6
0
 def test_url_matcher_doesnt_match_url_out_of_given_period(self):
     downloader = Downloader("")
     url = "http://somedomain/2011/patent.zip"
     matched = downloader.url_matcher(url, 2012, 2013)
     assert not matched