瀏覽代碼

history is saved in the data dir

Oz Tiram 6 年之前
父節點
當前提交
c487843be1
共有 2 個文件被更改,包括 2 次插入3 次删除
  1. 0 1
      .travis.yml
  2. 2 2
      tests/test_config.py

+ 0 - 1
.travis.yml

@@ -19,7 +19,6 @@ before_script:
   - mongo pwmantest --eval 'db.createUser({user:"tester",pwd:"12345678",roles:["readWrite"]});'
   - mongo pwmantest --eval 'db.createUser({user:"tester",pwd:"12345678",roles:["readWrite"]});'
 
 
 before_install:
 before_install:
-  - test -d ~/.pwman && rm -vR ~/.pwman 
   - sudo apt-get update -qq
   - sudo apt-get update -qq
   - sudo apt-get install python-psycopg2 python3-psycopg2
   - sudo apt-get install python-psycopg2 python3-psycopg2
   - sudo apt-get install python-mysqldb
   - sudo apt-get install python-mysqldb

+ 2 - 2
tests/test_config.py

@@ -102,8 +102,8 @@ class TestConfig(unittest.TestCase):
         self.assertTrue(self.conf.parser.has_section('Readline'))
         self.assertTrue(self.conf.parser.has_section('Readline'))
 
 
     def test_has_user_history(self):
     def test_has_user_history(self):
-        cdir = find_config_dir('pwman')[0]
-        path = os.path.join(cdir, "history")
+        ddir = find_config_dir('pwman')[1]
+        path = os.path.join(ddir, "history")
         config = self.conf.get_value('Readline', 'history')
         config = self.conf.get_value('Readline', 'history')
         self.assertEqual(path, config)
         self.assertEqual(path, config)