Test tweaks (#11560)
* Fix is_allowed_path on OS X * Move APNS2 inside func in test
This commit is contained in:
parent
d793cfeb68
commit
0d06e8c1c9
2 changed files with 5 additions and 2 deletions
|
@ -797,8 +797,10 @@ class TestConfig(unittest.TestCase):
|
|||
def test_is_allowed_path(self):
|
||||
"""Test is_allowed_path method."""
|
||||
with TemporaryDirectory() as tmp_dir:
|
||||
# The created dir is in /tmp. This is a symlink on OS X
|
||||
# causing this test to fail unless we resolve path first.
|
||||
self.config.whitelist_external_dirs = set((
|
||||
tmp_dir,
|
||||
os.path.realpath(tmp_dir),
|
||||
))
|
||||
|
||||
test_file = os.path.join(tmp_dir, "test.jpg")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue