mjhea0 / flaskr-tdd

Flaskr: Intro to Flask, Test-Driven Development (TDD), and JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

First test database test

GiorgosTharropoulos opened this issue · comments

Hello,

The first time we test for the existence of the test.db, we expect the test.db file to located at tddflaskr/test.db. But the file is created inside the project/ directory. You have specified that 3 tests should fail, the initial test should pass. Unfortunately, it does not because as I said, the test database is created inside the project directory and not at the root.

The test would pass if the tests are run within the project directory, am I missing something?

Thank you for the excellent tutorial!

I'd have to look at the structure of your project. Is it on GitHub?

Hello,

You can find my project here: https://github.com/GiorgosTharropoulos/tddflaskr

Thank you!

I see the issue. The "tests" directory needs to be placed outside the "project" directory. See the final project structure here: https://github.com/mjhea0/flaskr-tdd.

Sorry about that ! Thank you