Created
July 24, 2012 16:11
-
-
Save msabramo/3170924 to your computer and use it in GitHub Desktop.
Trying to run tests for HarukaSMS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~/dev/git-repos/HarukaSMS$ python manage.py test | |
| EE..FFFFFFE.FFFFFE... | |
| ====================================================================== | |
| ERROR: test_generate_code (HarukaSMS.code_generator.tests.CodeGeneratorTests) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/code_generator/tests.py", line 93, in test_generate_code | |
| field='username', model=User), 'L002') | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/code_generator/code_generator.py", line 166, in generate_code | |
| code = get_previous_code_function(**kwargs) | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/code_generator/code_generator.py", line 32, in get_code_from_model | |
| nqs.append(int(getattr(m, field).lstrip(kwargs['prefix']).rstrip(kwargs['suffix']))) | |
| KeyError: '\'suffix\'\n-------------------- >> begin captured logging << --------------------\ndjango.db.backends: DEBUG: (0.002) SELECT "rapidsms_httprouter_message"."id", "rapidsms_httprouter_message"."connection_id", "rapidsms_httprouter_message"."text", "rapidsms_httprouter_message"."direction", "rapidsms_httprouter_message"."status", "rapidsms_httprouter_message"."date", "rapidsms_httprouter_message"."in_response_to_id", "rapidsms_httprouter_message"."application" FROM "rapidsms_httprouter_message" WHERE ("rapidsms_httprouter_message"."status" = L AND "rapidsms_httprouter_message"."direction" = O ); args=(\'L\', \'O\')\ndjango.db.backends: DEBUG: (0.000) SELECT "rapidsms_httprouter_message"."id", "rapidsms_httprouter_message"."connection_id", "rapidsms_httprouter_message"."text", "rapidsms_httprouter_message"."direction", "rapidsms_httprouter_message"."status", "rapidsms_httprouter_message"."date", "rapidsms_httprouter_message"."in_response_to_id", "rapidsms_httprouter_message"."application" FROM "rapidsms_httprouter_message" WHERE ("rapidsms_httprouter_message"."status" = L AND "rapidsms_httprouter_message"."direction" = O ); args=(\'L\', \'O\')\n--------------------- >> end captured logging << ---------------------' | |
| ====================================================================== | |
| ERROR: test_get_code_from_model (HarukaSMS.code_generator.tests.CodeGeneratorTests) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/code_generator/tests.py", line 35, in test_get_code_from_model | |
| self.assertEqual(get_code_from_model(User, 'username', default='0'), | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/code_generator/code_generator.py", line 38, in get_code_from_model | |
| return "%s%s%s" % (kwargs['prefix'], nqs[0], kwargs['suffix']) | |
| KeyError: 'prefix' | |
| ====================================================================== | |
| ERROR: testAddBulk (HarukaSMS.rapidsms_httprouter.tests.RouterTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/rapidsms_httprouter/tests.py", line 151, in testAddBulk | |
| msgs = Message.mass_text('Jenny I got your number', [self.connection]) | |
| File "/Users/marca/dev/git-repos/HarukaSMS/rapidsms_httprouter/models.py", line 70, in mass_text | |
| connection=connection) | |
| File "/Users/marca/dev/git-repos/HarukaSMS/rapidsms_httprouter/managers.py", line 377, in bulk_insert | |
| self._related_init() | |
| File "/Users/marca/dev/git-repos/HarukaSMS/rapidsms_httprouter/managers.py", line 652, in _related_init | |
| self._collect_field_defaults() | |
| File "/Users/marca/dev/git-repos/HarukaSMS/rapidsms_httprouter/managers.py", line 671, in _collect_field_defaults | |
| self.defaults[f.name] = scrapModel._meta.get_field(f.name).get_db_prep_save(f.pre_save(scrapModel, True)) | |
| TypeError: get_db_prep_save() takes exactly 3 arguments (2 given) | |
| ====================================================================== | |
| ERROR: Failure: ImportError (No module named afrims.tests.testcases) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/haruka.venv/lib/python2.7/site-packages/nose/loader.py", line 390, in loadTestsFromName | |
| addr.filename, addr.module) | |
| File "/Users/marca/dev/git-repos/HarukaSMS/haruka.venv/lib/python2.7/site-packages/nose/importer.py", line 39, in importFromPath | |
| return self.importFromDir(dir_path, fqname) | |
| File "/Users/marca/dev/git-repos/HarukaSMS/haruka.venv/lib/python2.7/site-packages/nose/importer.py", line 86, in importFromDir | |
| mod = load_module(part_fqname, fh, filename, desc) | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/groups/tests.py", line 10, in <module> | |
| from afrims.tests.testcases import CreateDataTest, patch_settings | |
| ImportError: No module named afrims.tests.testcases | |
| ====================================================================== | |
| FAIL: test_numeric_polls (HarukaSMS.poll.tests.ProcessingTests) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 118, in test_numeric_polls | |
| self.assertInteraction(self.connection2, '19years', ':) go yo age!') | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 40, in assertInteraction | |
| self.assertEquals(Message.objects.filter(in_response_to=incoming_obj, text=expected_response).count(), 1) | |
| AssertionError: 0 != 1 | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] IN (5555555 via test) : 19years | |
| httprouter: DEBUG: In filter phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In parse phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In handle phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In default phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In cleanup phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: test_poll_translation (HarukaSMS.poll.tests.ProcessingTests) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 251, in test_poll_translation | |
| self.assertEquals(Message.objects.count(), 2) | |
| AssertionError: 0 != 2 | |
| ====================================================================== | |
| FAIL: test_recategorization (HarukaSMS.poll.tests.ProcessingTests) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 130, in test_recategorization | |
| self.assertInteraction(self.connection1, 'apples', 'thanks!') | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 40, in assertInteraction | |
| self.assertEquals(Message.objects.filter(in_response_to=incoming_obj, text=expected_response).count(), 1) | |
| AssertionError: 0 != 1 | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] IN (8675309 via test) : apples | |
| httprouter: DEBUG: In filter phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In parse phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In handle phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In default phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In cleanup phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: test_response_type_handling (HarukaSMS.poll.tests.ProcessingTests) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 175, in test_response_type_handling | |
| self.assertInteraction(self.connection1, 'get me a kindle :)', 'yikes :(') | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 40, in assertInteraction | |
| self.assertEquals(Message.objects.filter(in_response_to=incoming_obj, text=expected_response).count(), 1) | |
| AssertionError: 0 != 1 | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] IN (8675309 via test) : get me a kindle :) | |
| httprouter: DEBUG: In filter phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In parse phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In handle phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In default phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In cleanup phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: test_simple_poll_responses (HarukaSMS.poll.tests.ProcessingTests) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 72, in test_simple_poll_responses | |
| self.assertEquals(Message.objects.count(), 1) | |
| AssertionError: 0 != 1 | |
| ====================================================================== | |
| FAIL: test_yes_no_polls (HarukaSMS.poll.tests.ProcessingTests) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 105, in test_yes_no_polls | |
| self.assertInteraction(self.connection2, 'yes', 'glad to know where you are!') | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/poll/tests.py", line 40, in assertInteraction | |
| self.assertEquals(Message.objects.filter(in_response_to=incoming_obj, text=expected_response).count(), 1) | |
| AssertionError: 0 != 1 | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] IN (5555555 via test) : yes | |
| httprouter: DEBUG: In filter phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In parse phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In handle phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In default phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In cleanup phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: testAppCancel (HarukaSMS.rapidsms_httprouter.tests.RouterTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/rapidsms_httprouter/tests.py", line 219, in testAppCancel | |
| self.assertEqual(db_msg.status, 'C') | |
| AssertionError: 'P' != 'C' | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] OUT (2067799294 via test_backend) : test | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: testAppReply (HarukaSMS.rapidsms_httprouter.tests.RouterTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/rapidsms_httprouter/tests.py", line 270, in testAppReply | |
| self.assertEqual(response.status, "Q") | |
| AssertionError: u'P' != 'Q' | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] IN (2067799294 via test_backend) : test send | |
| httprouter: DEBUG: In filter phase | |
| httprouter: DEBUG: In <app: ReplyApp> app | |
| httprouter: DEBUG: In <app: rapidsms_httprouter> app | |
| httprouter: DEBUG: In parse phase | |
| httprouter: DEBUG: In <app: ReplyApp> app | |
| httprouter: DEBUG: In <app: rapidsms_httprouter> app | |
| httprouter: DEBUG: In handle phase | |
| httprouter: DEBUG: In <app: ReplyApp> app | |
| httprouter: DEBUG: Short-circuited | |
| httprouter: DEBUG: In default phase | |
| httprouter: DEBUG: Skipping phase | |
| httprouter: INFO: SMS[2] OUT (2067799294 via test_backend) : reply | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: testRouter (HarukaSMS.rapidsms_httprouter.tests.RouterTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/rapidsms_httprouter/tests.py", line 178, in testRouter | |
| self.assertEqual(db_msg.status, 'Q') | |
| AssertionError: 'P' != 'Q' | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] OUT (2067799294 via test_backend) : test | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: testSecurity (HarukaSMS.rapidsms_httprouter.tests.ViewTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/rapidsms_httprouter/tests.py", line 382, in testSecurity | |
| self.assertEquals(msg_count+2, Message.objects.all().count()) | |
| AssertionError: 2 != 1 | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] IN (2067799294 via test_backend) : test | |
| httprouter: DEBUG: In filter phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In parse phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In handle phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In default phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In cleanup phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: testViews (HarukaSMS.rapidsms_httprouter.tests.ViewTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/Users/marca/dev/git-repos/HarukaSMS/../HarukaSMS/rapidsms_httprouter/tests.py", line 319, in testViews | |
| self.assertEquals(1, len(outbox['outbox'])) | |
| AssertionError: 1 != 0 | |
| -------------------- >> begin captured logging << -------------------- | |
| httprouter: INFO: SMS[1] IN (2067799294 via test_backend) : test | |
| httprouter: DEBUG: In filter phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In parse phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In handle phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In default phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| httprouter: DEBUG: In cleanup phase | |
| httprouter: DEBUG: In <app: registration> app | |
| httprouter: DEBUG: In <app: rapidsms_xforms> app | |
| httprouter: DEBUG: In <app: bulksend> app | |
| httprouter: DEBUG: In <app: poll> app | |
| --------------------- >> end captured logging << --------------------- | |
| ---------------------------------------------------------------------- | |
| Ran 21 tests in 8.101s | |
| FAILED (errors=4, failures=11) | |
| nosetests --verbosity 1 | |
| To reuse old database "/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/default.rapidsms.test.sqlite3" for speed, set env var REUSE_DB=1. | |
| Creating test database for alias 'default'... | |
| Destroying old test database 'default'... | |
| Destroying test database for alias 'default'... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment