replace popular/ranking tests with older ones
Metadata of several year old lists shouldn't change as much as it would for newer ones, which makes metadata-comparisons of the output of build_testresult_db.oy easier.
This commit is contained in:
@@ -57,8 +57,8 @@ class ThreedeebooruPopularExtractor(ThreedeebooruExtractor,
|
||||
"""Extractor for popular images from behoimi.org"""
|
||||
pattern = [r"(?:https?://)?(?:www\.)?behoimi\.org/post/popular_"
|
||||
r"(by_(?:day|week|month)|recent)(?:\?([^#]*))?"]
|
||||
test = [("http://behoimi.org/post/popular_by_month?month=6&year=2017", {
|
||||
"url": "d2f8b04e54b12b8daaa4ba5fbea84d7dabe8a5df",
|
||||
test = [("http://behoimi.org/post/popular_by_month?month=2&year=2013", {
|
||||
"url": "dfe779d6e6336bd8f67078483bc14b2af1a5aee8",
|
||||
"count": 20,
|
||||
})]
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class DanbooruPopularExtractor(DanbooruExtractor, booru.BooruPopularExtractor):
|
||||
test = [
|
||||
("https://danbooru.donmai.us/explore/posts/popular", None),
|
||||
(("https://danbooru.donmai.us/explore/posts/popular"
|
||||
"?date=2017-07-17+14%3A13%3A05+-0400&scale=week"), {
|
||||
"?date=2013-06-06+03%3A34%3A22+-0400&scale=week"), {
|
||||
"count": 20,
|
||||
}),
|
||||
]
|
||||
|
||||
@@ -51,8 +51,7 @@ class E621PopularExtractor(E621Extractor, booru.BooruPopularExtractor):
|
||||
"""Extractor for popular images from 621.net"""
|
||||
pattern = [r"(?:https?://)?(?:www\.)?e621\.net/post/popular_by_"
|
||||
r"(day|week|month)(?:\?([^#]*))?"]
|
||||
test = [("https://e621.net/post/popular_by_month?month=6&year=2017", {
|
||||
"url": "e09aba8e7f2026e7925e7f7b74c1ea9da2a1682d",
|
||||
test = [("https://e621.net/post/popular_by_month?month=6&year=2013", {
|
||||
"count": 32,
|
||||
})]
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class KonachanPopularExtractor(KonachanExtractor, booru.BooruPopularExtractor):
|
||||
"""Extractor for popular images from konachan.com"""
|
||||
pattern = [r"(?:https?://)?(?:www\.)?konachan\.com/post/popular_"
|
||||
r"(by_(?:day|week|month)|recent)(?:\?([^#]*))?"]
|
||||
test = [("https://konachan.com/post/popular_by_month?month=11&year=2016", {
|
||||
test = [("https://konachan.com/post/popular_by_month?month=11&year=2010", {
|
||||
"count": 20,
|
||||
})]
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class YanderePopularExtractor(YandereExtractor, booru.BooruPopularExtractor):
|
||||
pattern = [r"(?:https?://)?(?:www\.)?yande\.re/post/popular_"
|
||||
r"(by_(?:day|week|month)|recent)(?:\?([^#]*))?"]
|
||||
test = [
|
||||
("https://yande.re/post/popular_by_day?day=20&month=8&year=2017", {
|
||||
("https://yande.re/post/popular_by_month?month=6&year=2014", {
|
||||
"count": 40,
|
||||
}),
|
||||
("https://yande.re/post/popular_recent", None),
|
||||
|
||||
@@ -32,6 +32,9 @@ class TestExtractors(unittest.TestCase):
|
||||
self.assertEqual(extr, tjob.extractor.__class__)
|
||||
if not result:
|
||||
return
|
||||
if "options" in result:
|
||||
for key, value in result["options"]:
|
||||
config.set(key, value)
|
||||
if "exception" in result:
|
||||
self.assertRaises(result["exception"], tjob.run)
|
||||
return
|
||||
@@ -63,9 +66,7 @@ skip = [
|
||||
"exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie",
|
||||
"archivedmoe", "archiveofsins", "thebarchive",
|
||||
# temporary issues
|
||||
"imgtrex", # 504
|
||||
"e621",
|
||||
"3dbooru",
|
||||
"luscious", # ssl cert issues
|
||||
]
|
||||
# enable selective testing for direct calls
|
||||
if __name__ == '__main__' and len(sys.argv) > 1:
|
||||
|
||||
Reference in New Issue
Block a user