Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Getting error on final task of Tacocat challenge

Hi there,

I am on the last error to finish the tacocat challenge. I don't know what this error means, so I don't know how to fix it. This is what I am getting, please help translate it:

======================================================================                           
FAIL: test_taco_create (__main__.TacoViewsTestCase)                                              
----------------------------------------------------------------------                           
Traceback (most recent call last):                                                               
  File "app_tests.py", line 144, in test_taco_create                                             
    self.assertEqual(rv.status_code, 302)                                                        
AssertionError: 404 != 302          

If you can point me in the right direction, I would great appreciate it.

Thank you!

[MOD: added markdown -cf]

2 Answers

Nevermind, it is actually very simple. The test wants to go to /taco to create a taco. If you have made the url of your "Add a new taco" page anything other than "/taco", you will get this error.

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

The test is expecting a 302 return code (URL redirection) after creating a new taco. It is getting a 404 (page not found)