summaryrefslogtreecommitdiff
path: root/tests/test_asset.py
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2018-10-14 23:16:48 -0500
committerMichael Merickel <michael@merickel.org>2018-10-14 23:46:11 -0500
commitdd3cc81f75dcb5ff96e0751653071722a15f46c2 (patch)
tree7cfd6140211a21dedd2ddfeb4aa77b7ff4339fa9 /tests/test_asset.py
parenteadaee315eb142d1537d617da58343e3d7f1df0a (diff)
downloadpyramid-dd3cc81f75dcb5ff96e0751653071722a15f46c2.tar.gz
pyramid-dd3cc81f75dcb5ff96e0751653071722a15f46c2.tar.bz2
pyramid-dd3cc81f75dcb5ff96e0751653071722a15f46c2.zip
fix the tests to import from the tests package instead of pyramid.tests
Diffstat (limited to 'tests/test_asset.py')
-rw-r--r--tests/test_asset.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_asset.py b/tests/test_asset.py
index d3ebd5f7d..cddeb48df 100644
--- a/tests/test_asset.py
+++ b/tests/test_asset.py
@@ -14,14 +14,14 @@ class Test_resolve_asset_spec(unittest.TestCase):
self.assertEqual(package_name, None)
def test_rel_spec(self):
- pkg = 'pyramid.tests'
+ pkg = 'tests'
path = 'test_asset.py'
package_name, filename = self._callFUT(path, pkg)
- self.assertEqual(package_name, 'pyramid.tests')
+ self.assertEqual(package_name, 'tests')
self.assertEqual(filename, 'test_asset.py')
def test_abs_spec(self):
- pkg = 'pyramid.tests'
+ pkg = 'tests'
path = 'pyramid.nottests:test_asset.py'
package_name, filename = self._callFUT(path, pkg)
self.assertEqual(package_name, 'pyramid.nottests')
@@ -35,11 +35,11 @@ class Test_resolve_asset_spec(unittest.TestCase):
self.assertEqual(filename, 'test_asset.py')
def test_package_name_is_package_object(self):
- import pyramid.tests
- pkg = pyramid.tests
+ import tests
+ pkg = tests
path = 'test_asset.py'
package_name, filename = self._callFUT(path, pkg)
- self.assertEqual(package_name, 'pyramid.tests')
+ self.assertEqual(package_name, 'tests')
self.assertEqual(filename, 'test_asset.py')
@@ -57,7 +57,7 @@ class Test_abspath_from_asset_spec(unittest.TestCase):
self.assertEqual(result, '/abc')
def test_pkgrelative(self):
- result = self._callFUT('abc', 'pyramid.tests')
+ result = self._callFUT('abc', 'tests')
self.assertEqual(result, os.path.join(here, 'abc'))
class Test_asset_spec_from_abspath(unittest.TestCase):
@@ -72,13 +72,13 @@ class Test_asset_spec_from_abspath(unittest.TestCase):
def test_abspath_startswith_package_path(self):
abspath = os.path.join(here, 'fixtureapp')
- pkg = DummyPackage('pyramid.tests')
+ pkg = DummyPackage('tests')
pkg.__file__ = 'file'
result = self._callFUT(abspath, pkg)
- self.assertEqual(result, 'pyramid:fixtureapp')
+ self.assertEqual(result, 'tests:fixtureapp')
def test_abspath_doesnt_startwith_package_path(self):
- pkg = DummyPackage('pyramid.tests')
+ pkg = DummyPackage('tests')
result = self._callFUT(here, pkg)
self.assertEqual(result, here)