1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:09:44 +00:00

adding update mini test

This commit is contained in:
deadc0de6
2018-01-14 14:07:34 +01:00
parent 8d1e14ccae
commit 9e7e2e3e3a

View File

@@ -13,6 +13,7 @@ from dotdrop.dotdrop import importer
from dotdrop.dotdrop import list_profiles
from dotdrop.dotdrop import list_files
from dotdrop.dotdrop import header
from dotdrop.dotdrop import update
from dotdrop.config import Cfg
from tests.helpers import *
@@ -196,6 +197,15 @@ class TestImport(unittest.TestCase):
list_files(opts, conf)
header()
# fake test update
editcontent = 'edited'
with open(dotfile1, 'w') as f:
f.write('edited')
opts['safe'] = False
update(opts, conf, dotfile1)
c2 = open(indt1, 'r').read()
self.assertTrue(editcontent == c2)
def main():
unittest.main()