We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fa6e97 commit 1a22f84Copy full SHA for 1a22f84
tests/tests.py
@@ -6,6 +6,7 @@
6
import logging
7
import os
8
import shutil
9
+import tempfile
10
import unittest
11
import uuid
12
from datetime import datetime, timedelta
@@ -831,8 +832,10 @@ def test_set_credentials(self):
831
832
self.assertEqual('foobar_user', results.username)
833
834
def test_dump_xml(self):
- self.kp.dump_xml('db_dump.xml')
835
- with open('db_dump.xml') as f:
+ self.test_dir = tempfile.mkdtemp()
836
+ self.dump_file = os.path.join(self.test_dir, 'db_dump.xml')
837
+ self.kp.dump_xml(self.dump_file)
838
+ with open(self.dump_file) as f:
839
first_line = f.readline()
840
self.assertEqual(first_line, '<?xml version=\'1.0\' encoding=\'utf-8\' standalone=\'yes\'?>\n')
841
0 commit comments