From the course: Test-Driven Development in Django

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Passing your first test

Passing your first test

From the course: Test-Driven Development in Django

Start my 1-month free trial

Passing your first test

- Now comes the time for us to run our functional test for the very first time. Now we won't expect this test to pass. We don't have any browser running so that shouldn't find the word install anywhere. But let's go ahead and see how we can fail. Let's do python func_tests.py hit enter on that and you can see what happens on your own computer. It actually launches, like I said before, a Firefox browser, and it's going to have this big nasty error here in the terminal saying, hey you know we looked, we couldn't find anything it failed on line four. Which if we go to our line four it's saying I couldn't even get to this page here let alone try and find the word install. So remember with testing it's a good thing to fail initially. We write a test that will for sure fail and then it's our goal to write the code in order to make that happen. So now that we have that premise let's go ahead and move back to our terminal and let's take the steps in order to pass this test. So in order to…

Contents