aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_config.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-03-13 02:07:55 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2023-03-13 02:07:55 -0400
commitc5965a4d7650b7e935f630e40d883801967f7bcc (patch)
tree2223d05254347c00a339e4476d3daea7b2624fb4 /test/test_config.py
parentbaa8beeeb8bbe097f0b33d8c029fbd299253efa0 (diff)
parent10987f08f8b6c510ba64f4b42d95ba67eec6e5b0 (diff)
Update upstream source from tag 'upstream/1.25.0'
Update to upstream version '1.25.0' with Debian dir c2275e6e216e12115941d12f2b939d3f1a36436e
Diffstat (limited to 'test/test_config.py')
-rw-r--r--test/test_config.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_config.py b/test/test_config.py
index 7cbb12b..859faf5 100644
--- a/test/test_config.py
+++ b/test/test_config.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# Copyright 2015-2020 Mike Fährmann
+# Copyright 2015-2023 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -11,12 +11,11 @@ import os
import sys
import unittest
-import json
import tempfile
ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, ROOTDIR)
-from gallery_dl import config # noqa E402
+from gallery_dl import config, util # noqa E402
class TestConfig(unittest.TestCase):
@@ -209,8 +208,8 @@ class TestConfigFiles(unittest.TestCase):
def _load(name):
path = os.path.join(ROOTDIR, "docs", name)
try:
- with open(path) as fp:
- return json.load(fp)
+ with open(path) as file:
+ return util.json_loads(file.read())
except FileNotFoundError:
raise unittest.SkipTest(path + " not available")