Help with Test Driven Development by Harry Percival, unexpected error!

I've been trying to go through the book Test Driven Development for Python by Harry Percival, but have come to an error that I can't seem to get around. I've tried to google the problem but I still for the life of me can not figure it out.

The HTML code is:

<body>
    <h1>Your To-Do list</h1>
        <form method="POST">
            <input name="item_text" id="id_new_item" placeholder="Enter a to-do item" />
            {% csrf_token %}
        </form>
        <table id="id_list_table">
        <tr><td>{{ new_item_text }}</td></tr>
    </table>
</body>

and the functional_test where the error occurs is:

self.assertIn('To-Do', self.browser.title)
header_text = self.browser.find_element_by_tag_name('h1').text
self.assertIn('To-Do', header_text)

and the error I get when I run it in the terminal is:

Traceback (most recent call last):
File "functional_tests.py", line 27, in     test_can_start_a_list_and_retrieve_it_later
self.assertIn('To-Do', self.browser.title)
AssertionError: 'To-Do' not found in 'ImportError at /'

Does anyone have any suggestions or experience with this book by any chance that could lend me a hand?

Thanks!

edit: formatting

Posted Aug 29, 2016, 11:25 PM UTC · edited

13
Loading comments…