I'm here:
http://chimera.labs.oreilly.com/books/1234000000754/ch15.html#_reverting_our_spiked_code
I've executed:
rm -rf accounts # remove any trace of spiked code
And now I am supposed to do:
python3 manage.py test functional_tests.test_login
But I get:
michael@michael:~/Tdd/superlists$ python3 manage.py test functional_tests.test_login
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/usr/local/lib/python3.4/dist-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.4/dist-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python3.4/dist-packages/django/apps/config.py", line 86, in create
module = import_module(entry)
File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
ImportError: No module named 'accounts'
Well, the reason seems to be in settings.py.
In INSTALLED_APPS I comment 'accounts' out.
Start the test again. Now tons of garbage traceback information is rains over me. In the book it is just one line: NoSuchElementException
I had to copy all the traceback info and paste it into a text editor and look for it via Ctrl+f. Nothing.
Then in settings.py I had to comment out:
# AUTH_USER_MODEL = 'accounts.User'
# AUTHENTICATION_BACKENDS = (
# 'accounts.authentication.PersonaAuthenticationBackend',
# )
And now I can see NoSuchElementException
Am I correct that everybody have to manipulate things like me?
If yes, I would say it is not convenient for a reader.
The reader of the book is a beginner. Wouldn't it be better if all the steps in the book were explicit and reproduced symbol by symbol?
Please, pardon me if I'm wrong with that introductory assumption that everybody has to comment something out which is not mentioned in the book.