Skip to content

Commit 23d611e

Browse files
committed
simple removal of db_dump.xml
1 parent e2f7517 commit 23d611e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/tests.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import logging
44
import os
55
import shutil
6-
import tempfile
76
import unittest
87
import uuid
98
from datetime import datetime, timedelta, timezone
109

10+
# FIXME: remove dateutil dependency as per https://github.com/libkeepass/pykeepass/pull/371
11+
from dateutil import tz
1112
from pathlib import Path
1213

1314
from io import BytesIO
@@ -891,12 +892,12 @@ def test_set_credentials(self):
891892
self.assertEqual('foobar_user', results.username)
892893

893894
def test_dump_xml(self):
894-
self.test_dir = tempfile.mkdtemp()
895-
self.dump_file = os.path.join(self.test_dir, 'db_dump.xml')
896-
self.kp.dump_xml(self.dump_file)
897-
with open(self.dump_file) as f:
895+
dump_file = base_dir / 'db_dump.xml'
896+
self.kp.dump_xml(dump_file)
897+
with open(dump_file) as f:
898898
first_line = f.readline()
899899
self.assertEqual(first_line, '<?xml version=\'1.0\' encoding=\'utf-8\' standalone=\'yes\'?>\n')
900+
dump_file.unlink()
900901

901902
def test_credchange(self):
902903
"""

0 commit comments

Comments
 (0)