Skip to content

Commit

Permalink
Update test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
josemoracard authored Jan 11, 2024
1 parent 18f34cc commit 9e099c9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .learn/exercises/08.2-finish-todos/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def client():
os.close(db_fd)
os.unlink(app.config['DATABASE'])

@pytest.mark.it("folder src must exist")
@pytest.mark.it("Folder src must exist")
def test_src_folder():
assert os.path.isdir("./src/")

@pytest.mark.it("app.py must exist")
@pytest.mark.it("File app.py must exist")
def test_pipfile_exists():
assert os.path.isfile("src/app.py")

Expand Down Expand Up @@ -63,7 +63,7 @@ def test_labels_string():
if "label" in task:
assert isinstance(task["label"], str)

@pytest.mark.it('The value of the "done" key on each todo should be boolean')
@pytest.mark.it('The value of the "done" key on each todo should be a boolean')
def test_done_bool():
from src import app
for task in app.todos:
Expand Down Expand Up @@ -142,9 +142,8 @@ def test_incoming_list(client):
matches.append(task)
assert 1 == len(matches)

"""
Testing DELETE
"""

# Testing DELETE

@pytest.mark.it("The function delete_todo should be declared")
def test_delete():
Expand Down Expand Up @@ -175,4 +174,4 @@ def test_delete_and_get(client):
response2 = client.delete('/todos/0')
data = json.loads(response2.data)

assert (len(todos) - 1) == len(data)
assert (len(todos) - 1) == len(data)

0 comments on commit 9e099c9

Please sign in to comment.