From b09a962838c3f416fa56672b6f52baeb35f0fc05 Mon Sep 17 00:00:00 2001 From: Abhinav Sarkar Date: Wed, 4 Mar 2009 08:18:25 +0000 Subject: [PATCH] corrected import path --- test/__init__.py | 3 ++- test/test_album.py | 4 ++-- test/test_artist.py | 4 ++-- test/test_event.py | 4 ++-- test/test_geo.py | 4 ++-- test/test_tag.py | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/test/__init__.py b/test/__init__.py index 5e0e1d1..105d8fd 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -1,4 +1,5 @@ import test_album import test_tag import test_event -import test_artist \ No newline at end of file +import test_artist +import test_geo \ No newline at end of file diff --git a/test/test_album.py b/test/test_album.py index be6db80..b86546c 100644 --- a/test/test_album.py +++ b/test/test_album.py @@ -6,7 +6,7 @@ __license__ = "GNU Lesser General Public License" import unittest import datetime -import sys +import sys, os from wsgi_intercept.urllib2_intercept import install_opener import wsgi_intercept @@ -15,7 +15,7 @@ from wsgi_test_app import create_wsgi_app install_opener() wsgi_intercept.add_wsgi_intercept('ws.audioscrobbler.com', 80, create_wsgi_app) -sys.path.append("..") +sys.path.append(os.path.dirname(os.path.dirname(__file__))) from lastfm import Api class TestAlbum(unittest.TestCase): diff --git a/test/test_artist.py b/test/test_artist.py index 456d7dc..24fbb43 100644 --- a/test/test_artist.py +++ b/test/test_artist.py @@ -6,7 +6,7 @@ __license__ = "GNU Lesser General Public License" import unittest import datetime -import sys +import sys, os from wsgi_intercept.urllib2_intercept import install_opener import wsgi_intercept @@ -15,7 +15,7 @@ from wsgi_test_app import create_wsgi_app install_opener() wsgi_intercept.add_wsgi_intercept('ws.audioscrobbler.com', 80, create_wsgi_app) -sys.path.append("..") +sys.path.append(os.path.dirname(os.path.dirname(__file__))) from lastfm import Api class TestArtist(unittest.TestCase): diff --git a/test/test_event.py b/test/test_event.py index efd283c..c0de7c6 100644 --- a/test/test_event.py +++ b/test/test_event.py @@ -6,7 +6,7 @@ __license__ = "GNU Lesser General Public License" import unittest import datetime -import sys +import sys, os from wsgi_intercept.urllib2_intercept import install_opener import wsgi_intercept @@ -15,7 +15,7 @@ from wsgi_test_app import create_wsgi_app install_opener() wsgi_intercept.add_wsgi_intercept('ws.audioscrobbler.com', 80, create_wsgi_app) -sys.path.append("..") +sys.path.append(os.path.dirname(os.path.dirname(__file__))) from lastfm import Api class TestEvent(unittest.TestCase): diff --git a/test/test_geo.py b/test/test_geo.py index 0a11a78..a86a23c 100644 --- a/test/test_geo.py +++ b/test/test_geo.py @@ -6,7 +6,7 @@ __license__ = "GNU Lesser General Public License" import unittest import datetime -import sys +import sys, os from wsgi_intercept.urllib2_intercept import install_opener import wsgi_intercept @@ -15,7 +15,7 @@ from wsgi_test_app import create_wsgi_app install_opener() wsgi_intercept.add_wsgi_intercept('ws.audioscrobbler.com', 80, create_wsgi_app) -sys.path.append("..") +sys.path.append(os.path.dirname(os.path.dirname(__file__))) from lastfm import Api class TestGeo(unittest.TestCase): diff --git a/test/test_tag.py b/test/test_tag.py index 1f655b9..3921044 100644 --- a/test/test_tag.py +++ b/test/test_tag.py @@ -6,7 +6,7 @@ __license__ = "GNU Lesser General Public License" import unittest import datetime -import sys +import sys, os from wsgi_intercept.urllib2_intercept import install_opener import wsgi_intercept @@ -15,7 +15,7 @@ from wsgi_test_app import create_wsgi_app install_opener() wsgi_intercept.add_wsgi_intercept('ws.audioscrobbler.com', 80, create_wsgi_app) -sys.path.append("..") +sys.path.append(os.path.dirname(os.path.dirname(__file__))) from lastfm import Api class TestTag(unittest.TestCase):