summaryrefslogtreecommitdiff
path: root/tests/test_script_production.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-09-19 18:37:28 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-09-19 18:37:28 -0400
commit049e8303b42b70df562a9e33bbb4aa66f99b2824 (patch)
tree78086bb03dfb6bf9c16945476f32177771a19bff /tests/test_script_production.py
parent63bbcd0df8e61ceaa734ec39ed9d5de6fff42308 (diff)
downloadalembic-049e8303b42b70df562a9e33bbb4aa66f99b2824.tar.gz
Fix NormPathTest again....to not have my workstation paths in it :)
Change-Id: I743f7ec9379a09a4ade4f4e4b03e586c0b06517b
Diffstat (limited to 'tests/test_script_production.py')
-rw-r--r--tests/test_script_production.py34
1 files changed, 20 insertions, 14 deletions
diff --git a/tests/test_script_production.py b/tests/test_script_production.py
index 7188bba..4c1bec1 100644
--- a/tests/test_script_production.py
+++ b/tests/test_script_production.py
@@ -1270,24 +1270,28 @@ class NormPathTest(TestBase):
return path.replace("/", ":NORM:")
normpath = mock.Mock(side_effect=normpath)
- normstaging = _get_staging_directory().replace("/", ":NORM:")
+
with mock.patch("os.path.normpath", normpath):
eq_(
script._version_locations,
(
- ":NORM:home:NORM:classic:NORM:dev:NORM:alembic"
- ":NORM:%s:NORM:scripts:NORM:versions" % normstaging,
+ os.path.abspath(
+ os.path.join(
+ _get_staging_directory(), "scripts", "versions"
+ )
+ ).replace("/", ":NORM:"),
),
)
eq_(
script.versions,
- ":NORM:home:NORM:classic:NORM:dev:NORM:alembic:NORM:%s:"
- "NORM:scripts:NORM:versions" % normstaging,
+ os.path.abspath(
+ os.path.join(
+ _get_staging_directory(), "scripts", "versions"
+ )
+ ).replace("/", ":NORM:"),
)
- eq_(script.dir, "%s/scripts" % normstaging)
-
def test_script_location_muliple(self):
config = _multi_dir_testing_config()
@@ -1297,17 +1301,19 @@ class NormPathTest(TestBase):
return path.replace("/", ":NORM:")
normpath = mock.Mock(side_effect=normpath)
- normstaging = _get_staging_directory().replace("/", ":NORM:")
with mock.patch("os.path.normpath", normpath):
eq_(
script._version_locations,
[
- ":NORM:home:NORM:classic:NORM:dev:NORM:alembic"
- ":NORM:%s:NORM:model1:NORM:" % normstaging,
- ":NORM:home:NORM:classic:NORM:dev:NORM:alembic"
- ":NORM:%s:NORM:model2:NORM:" % normstaging,
- ":NORM:home:NORM:classic:NORM:dev:NORM:alembic"
- ":NORM:%s:NORM:model3:NORM:" % normstaging,
+ os.path.abspath(
+ os.path.join(_get_staging_directory(), "model1/")
+ ).replace("/", ":NORM:"),
+ os.path.abspath(
+ os.path.join(_get_staging_directory(), "model2/")
+ ).replace("/", ":NORM:"),
+ os.path.abspath(
+ os.path.join(_get_staging_directory(), "model3/")
+ ).replace("/", ":NORM:"),
],
)