瀏覽代碼

more cleaning of files created during tests

oz123 11 年之前
父節點
當前提交
7ef9bf3362
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      pwman/tests/db_tests.py

+ 4 - 0
pwman/tests/db_tests.py

@@ -241,11 +241,15 @@ class ConfigTest(unittest.TestCase):
 
     def test_config_write(self):
         config.save(os.path.join(os.path.dirname(__file__), 'testing_config'))
+        self.assertTrue(os.path.exists('testing_config'))
+        os.remove('testing_config')
 
     def test_config_write_with_none(self):
         config._file = os.path.join(os.path.dirname(__file__),
                                     'testing_config')
         config.save()
+        self.assertTrue(os.path.exists('testing_config'))
+        os.remove('testing_config')
 
     def test_write_no_permission(self):
         # this test will pass if you run as root ...