We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2da685 commit e2f7517Copy full SHA for e2f7517
1 file changed
tests/tests.py
@@ -3,6 +3,7 @@
3
import logging
4
import os
5
import shutil
6
+import tempfile
7
import unittest
8
import uuid
9
from datetime import datetime, timedelta, timezone
@@ -890,8 +891,10 @@ def test_set_credentials(self):
890
891
self.assertEqual('foobar_user', results.username)
892
893
def test_dump_xml(self):
- self.kp.dump_xml('db_dump.xml')
894
- with open('db_dump.xml') as f:
+ 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:
898
first_line = f.readline()
899
self.assertEqual(first_line, '<?xml version=\'1.0\' encoding=\'utf-8\' standalone=\'yes\'?>\n')
900
0 commit comments