Separate unit and functional tests

Change-Id: Ibb0e86a6e9ffd59849ce2c2cef05fa6d931b9d64
Closes-Bug: #1592804
diff --git a/tox.ini b/tox.ini
index 78ea67b..05d20e6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,8 +10,11 @@
                   pip install -U {opts} {packages}
 setenv =
    VIRTUAL_ENV={envdir}
+   LANGUAGE=en_US
+   LC_ALL=en_US.UTF-8
+   TESTS_DIR=./trsync/tests/unit/
 deps = -r{toxinidir}/test-requirements.txt
-commands = python setup.py test --slowest --testr-args='{posargs}'
+commands = python setup.py test --slowest --testr-args='{posargs:trsync.tests.unit}'
 
 [testenv:common-constraints]
 install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
@@ -57,4 +60,4 @@
 show-source = True
 ignore = E123,E125
 builtins = _
-exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
\ No newline at end of file
+exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
diff --git a/trsync/tests/rsync_remotes/__init__.py b/trsync/tests/functional/__init__.py
similarity index 100%
copy from trsync/tests/rsync_remotes/__init__.py
copy to trsync/tests/functional/__init__.py
diff --git a/trsync/tests/rsync_base.py b/trsync/tests/functional/rsync_base.py
similarity index 96%
rename from trsync/tests/rsync_base.py
rename to trsync/tests/functional/rsync_base.py
index ea97660..fefbdec 100644
--- a/trsync/tests/rsync_base.py
+++ b/trsync/tests/functional/rsync_base.py
@@ -19,7 +19,7 @@
 import pkgutil
 
 from trsync.tests import base
-from trsync.tests import rsync_remotes as remotes
+from trsync.tests.functional import rsync_remotes as remotes
 from trsync.utils import utils as utils
 
 
diff --git a/trsync/tests/rsync_remotes/__init__.py b/trsync/tests/functional/rsync_remotes/__init__.py
similarity index 100%
rename from trsync/tests/rsync_remotes/__init__.py
rename to trsync/tests/functional/rsync_remotes/__init__.py
diff --git a/trsync/tests/rsync_remotes/path.py b/trsync/tests/functional/rsync_remotes/path.py
similarity index 100%
rename from trsync/tests/rsync_remotes/path.py
rename to trsync/tests/functional/rsync_remotes/path.py
diff --git a/trsync/tests/rsync_remotes/rsync2.conf b/trsync/tests/functional/rsync_remotes/rsync2.conf
similarity index 100%
rename from trsync/tests/rsync_remotes/rsync2.conf
rename to trsync/tests/functional/rsync_remotes/rsync2.conf
diff --git a/trsync/tests/rsync_remotes/rsync2.py b/trsync/tests/functional/rsync_remotes/rsync2.py
similarity index 100%
rename from trsync/tests/rsync_remotes/rsync2.py
rename to trsync/tests/functional/rsync_remotes/rsync2.py
diff --git a/trsync/tests/test_rsync_mirror.py b/trsync/tests/functional/test_rsync_mirror.py
similarity index 98%
rename from trsync/tests/test_rsync_mirror.py
rename to trsync/tests/functional/test_rsync_mirror.py
index f698662..4fde561 100644
--- a/trsync/tests/test_rsync_mirror.py
+++ b/trsync/tests/functional/test_rsync_mirror.py
@@ -20,7 +20,7 @@
 from time import sleep
 
 from trsync.objects.rsync_mirror import TRsync
-from trsync.tests import rsync_base
+from trsync.tests.functional import rsync_base
 from trsync.utils.tempfiles import TempFiles
 
 
diff --git a/trsync/tests/test_rsync_ops.py b/trsync/tests/functional/test_rsync_ops.py
similarity index 99%
rename from trsync/tests/test_rsync_ops.py
rename to trsync/tests/functional/test_rsync_ops.py
index 34bc189..0c4bbb6 100644
--- a/trsync/tests/test_rsync_ops.py
+++ b/trsync/tests/functional/test_rsync_ops.py
@@ -18,7 +18,7 @@
 import os
 
 from trsync.objects.rsync_ops import RsyncOps
-from trsync.tests import rsync_base
+from trsync.tests.functional import rsync_base
 from trsync.utils.tempfiles import TempFiles
 
 
diff --git a/trsync/tests/test_rsync_remote.py b/trsync/tests/functional/test_rsync_remote.py
similarity index 96%
rename from trsync/tests/test_rsync_remote.py
rename to trsync/tests/functional/test_rsync_remote.py
index 682e9c0..024f1c5 100644
--- a/trsync/tests/test_rsync_remote.py
+++ b/trsync/tests/functional/test_rsync_remote.py
@@ -18,7 +18,7 @@
 import os
 
 from trsync.objects.rsync_remote import RsyncRemote
-from trsync.tests import rsync_base
+from trsync.tests.functional import rsync_base
 from trsync.utils.tempfiles import TempFiles
 
 
diff --git a/trsync/tests/test_utils.py b/trsync/tests/functional/test_utils.py
similarity index 100%
rename from trsync/tests/test_utils.py
rename to trsync/tests/functional/test_utils.py
diff --git a/trsync/tests/rsync_remotes/__init__.py b/trsync/tests/unit/__init__.py
similarity index 100%
copy from trsync/tests/rsync_remotes/__init__.py
copy to trsync/tests/unit/__init__.py
diff --git a/trsync/tests/test_rsync_url.py b/trsync/tests/unit/test_rsync_url.py
similarity index 100%
rename from trsync/tests/test_rsync_url.py
rename to trsync/tests/unit/test_rsync_url.py
diff --git a/trsync/tests/test_rsync_url.yaml b/trsync/tests/unit/test_rsync_url.yaml
similarity index 100%
rename from trsync/tests/test_rsync_url.yaml
rename to trsync/tests/unit/test_rsync_url.yaml