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 e2f7517 commit 23d611e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import logging
import os
import shutil
import tempfile
import unittest
import uuid
from datetime import datetime, timedelta, timezone

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

from io import BytesIO
Expand Down Expand Up @@ -891,12 +892,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 23d611e

Please sign in to comment.