-
Notifications
You must be signed in to change notification settings - Fork 1
What the test script output looks like
fish2000 edited this page May 21, 2012
·
3 revisions
N.B. At the moment, you need to manually start a couch instance before running the tests. Do NOT use a production and/or special-to-you-for-some-reason instance -- the current test suite WILL remorselessly fuck it up.
ASIO-OTUS:django-docfield-couchdb[master •]$ python ./docfield/tests.py
Creating test database for alias 'default' ('/var/folders/5h/k46wfdmx35s3dx5rb83490540000gn/T/tmpH3namO/docfield-test.db')...
Destroying old test database 'default'...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table docfield_testmodel
Creating table docfield_testcallablemodelfield
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
test_automatic_docfield (docfield.tests.DocFieldTests) ... ok
test_automatic_docfield_querysets (docfield.tests.DocFieldTests) ... ok
test_callable_fields (docfield.tests.DocFieldTests) ... ok
test_manual_docfield (docfield.tests.DocFieldTests) ... ok
test_manual_docfield_querysets (docfield.tests.DocFieldTests) ... ok
----------------------------------------------------------------------
Ran 5 tests in 0.876s
OK
Destroying test database for alias 'default' ('/var/folders/5h/k46wfdmx35s3dx5rb83490540000gn/T/tmpH3namO/docfield-test.db')...
Deleting test data: /var/folders/5h/k46wfdmx35s3dx5rb83490540000gn/T/tmpH3namO
ASIO-OTUS:django-docfield-couchdb[master •]$
ASIO-OTUS:django-docfield-couchdb[master •]$ python ./docfield/tests.py
Traceback (most recent call last):
File "./docfield/tests.py", line 28, in <module>
interactive=False, traceback=True, verbosity=2)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 150, in call_command
return klass.execute(*args, **defaults)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 72, in handle
failures = test_runner.run_tests(test_labels)
File "/usr/local/lib/python2.7/site-packages/django/test/simple.py", line 380, in run_tests
suite = self.build_suite(test_labels, extra_tests)
File "/usr/local/lib/python2.7/site-packages/django/test/simple.py", line 264, in build_suite
suite.addTest(build_suite(app))
File "/usr/local/lib/python2.7/site-packages/django/test/simple.py", line 79, in build_suite
test_module = get_tests(app_module)
File "/usr/local/lib/python2.7/site-packages/django/test/simple.py", line 36, in get_tests
test_module = import_module('.'.join(prefix + [TEST_MODULE]))
File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/usr/local/lib/python2.7/site-packages/django_docfield_couchdb-0.1.1-py2.7.egg/docfield/tests.py", line 37, in <module>
busbench = sofaset.get_or_create_db('test_docfield')
File "/usr/local/lib/python2.7/site-packages/couchdbkit-0.6.2-py2.7.egg/couchdbkit/client.py", line 146, in create_db
return self.get_db(dbname, create=True, **params)
File "/usr/local/lib/python2.7/site-packages/couchdbkit-0.6.2-py2.7.egg/couchdbkit/client.py", line 131, in get_db
return Database(self._db_uri(dbname), server=self, **params)
File "/usr/local/lib/python2.7/site-packages/couchdbkit-0.6.2-py2.7.egg/couchdbkit/client.py", line 265, in __init__
self.server.res.head('/%s/' % self.dbname)
File "/usr/local/lib/python2.7/site-packages/restkit-4.1.2-py2.7.egg/restkit/resource.py", line 122, in head
params_dict=params_dict, **params)
File "/usr/local/lib/python2.7/site-packages/couchdbkit-0.6.2-py2.7.egg/couchdbkit/resource.py", line 111, in request
payload=payload, headers=headers, **params)
File "/usr/local/lib/python2.7/site-packages/restkit-4.1.2-py2.7.egg/restkit/resource.py", line 190, in request
headers=self.make_headers(headers))
File "/usr/local/lib/python2.7/site-packages/restkit-4.1.2-py2.7.egg/restkit/client.py", line 412, in request
return self.perform(request)
File "/usr/local/lib/python2.7/site-packages/restkit-4.1.2-py2.7.egg/restkit/client.py", line 373, in perform
raise RequestError("socket.error: %s" % str(e))
restkit.errors.RequestError: socket.error: [Errno 61] Connection refused
Feedback and patches especially welcome here -- I like writing unit tests and all but I've got plenty to learn, esp. w/r/t other people's configurations and convolutions.
(* - see what I did there?)