Skip to content

Commit

Permalink
simple removal of db_dump.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Evidlo committed Feb 10, 2024
1 parent 3620d0c commit 1d50740
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import logging
import os
import shutil
import tempfile
import unittest
import uuid
from datetime import datetime, timedelta

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

Expand Down Expand Up @@ -850,12 +850,12 @@ def test_set_credentials(self):
self.assertEqual('foobar_user', results.username)

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

def test_credchange(self):
"""
Expand Down

0 comments on commit 1d50740

Please sign in to comment.