ensure keys for mastodon instances are available during tests
Calls to config.clear() from other tests are removing the API credentials set when importing mastodon.py for the first time.
This commit is contained in:
@@ -16,6 +16,7 @@ import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from gallery_dl import extractor
|
||||
from gallery_dl.extractor import mastodon
|
||||
from gallery_dl.extractor.common import Extractor, Message
|
||||
from gallery_dl.extractor.directlink import DirectlinkExtractor as DLExtractor
|
||||
|
||||
@@ -236,6 +237,10 @@ class TestExtractorWait(unittest.TestCase):
|
||||
|
||||
class TextExtractorOAuth(unittest.TestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
mastodon.generate_extractors()
|
||||
|
||||
def test_oauth1(self):
|
||||
for category in ("flickr", "smugmug", "tumblr"):
|
||||
extr = extractor.find("oauth:" + category)
|
||||
|
||||
Reference in New Issue
Block a user