Permalink
Browse files

Reorganizing for setup tools

  • Loading branch information...
1 parent 953f2f6 commit 42faf30ac858e3dd2c95182cf921f6356e889843 @clouserw committed Jun 29, 2010
View
1 MANIFEST.in
@@ -1 +1,2 @@
include README.rst
+prune examples
View
0 tests/__init__.py → examples/__init__.py
File renamed without changes.
View
0 examples/config/__init__.py
No changes.
View
0 test_settings.py-dist → examples/config/settings.py-dist
File renamed without changes.
View
16 fabfile.py
@@ -1,14 +1,22 @@
-# Used just to set the PYTHONPATH so the tests can load your settings file.
+"""
+Creating standalone Django apps is a PITA because you're not in a project, so
+you don't have a settings.py file. I can never remember to define
+DJANGO_SETTINGS_MODULE, so I run these commands which get the right env
+automatically.
+"""
import functools
import os
-from fabric.api import local
+from fabric.api import local, env
ROOT = os.path.abspath(os.path.dirname(__file__))
-os.environ['PYTHONPATH'] = ROOT
+os.environ['PYTHONPATH'] = os.pathsep.join([ROOT,
+ os.path.join(ROOT, 'examples')])
+
+env.hosts = ['localhost']
local = functools.partial(local, capture=False)
-def test():
+def test(pdb=False):
local('nosetests')
View
0 hera/__init__.py
No changes.
View
2 hera.py → hera/hera.py
@@ -10,7 +10,7 @@ class Hera:
def __init__(self, username, password, location, wsdl="System.Cache.wsdl"):
# Sorry windows
- url = "file://%s" % os.path.abspath(os.path.join('wsdl', wsdl))
+ url = "file://%s" % os.path.abspath(os.path.join('hera', 'wsdl', wsdl))
# Apparently Zeus's wsdl is broken and we have to jimmy this thing in
# manually. See https://fedorahosted.org/suds/ticket/220 for details.
View
0 hera/tests/__init__.py
No changes.
View
4 tests/test_hera.py → hera/tests/test_hera.py
@@ -2,8 +2,8 @@
import urllib
from urlparse import urlparse
-import test_settings as settings
-from hera.hera import Hera
+from hera.hera.hera import Hera
+from hera.examples.config import settings
class TestInterface(unittest.TestCase):
View
0 wsdl/System.Cache.wsdl → hera/wsdl/System.Cache.wsdl
File renamed without changes.

0 comments on commit 42faf30

Please sign in to comment.