aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2014-07-24 16:33:48 -0400
committerGravatar Jon Bernard <jbernard@tuxion.com> 2014-07-24 16:33:48 -0400
commit4a215801542e28a6c7fdaa2d9e9679ebe911f9fe (patch)
treec853cc157e27a4e95767eda1d436e0057b833e61 /tests/test_core.py
parente3ac8c34392cd75256ca0fc1dcc30101c85f68df (diff)
downloaddotfiles-4a215801542e28a6c7fdaa2d9e9679ebe911f9fe.tar.gz
dotfiles-4a215801542e28a6c7fdaa2d9e9679ebe911f9fe.tar.bz2
dotfiles-4a215801542e28a6c7fdaa2d9e9679ebe911f9fe.zip
A few more test tweaks
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py26
1 files changed, 5 insertions, 21 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index a425e24..640cac9 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1,33 +1,17 @@
-import os
-import pytest
-from utils import HomeDirectory
from dotfiles.core import Dotfiles as Repository
-REPOSITORY = 'dotfiles'
-
-
-def test_sync(tmpdir):
- """the quick, brown fox jumps over the lazy dog.
-
- lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat
- non proident, sunt in culpa qui officia deserunt mollit anim id est
- laborum"""
+def test_sync(homedir):
+ """Basic sync operation."""
contents = {'.foo': True,
'.bar': True,
'.baz': False}
- homedir = HomeDirectory(str(tmpdir), REPOSITORY, contents)
+ homedir.setup(contents)
- Repository(homedir=homedir.path,
- repository=os.path.join(homedir.path, REPOSITORY),
- prefix='', ignore=[], externals={}, packages=[],
- dry_run = False).sync()
+ Repository(path=homedir.repo,
+ homedir=homedir.path).sync()
# .baz should now exist and link to the correct location
contents['.baz'] = True