Skip to content

Commit 3371bcb

Browse files
committed
fix up errors and omissions
1 parent c125e95 commit 3371bcb

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

source/presentations/session06.rst

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ You'll want to read more about this module. See the reading list for
200200
suggestions.
201201

202202

203-
Testing Envrionment
203+
Testing Environment
204204
-------------------
205205

206206
The Python ``unittest`` module defines a class called a ``TestCase``. It
@@ -218,7 +218,11 @@ These methods are run before and after *each test*, and may be used to provide
218218

219219
.. class:: incremental
220220

221-
Create a ``microblog_tests.py`` file. Open it in your editor
221+
In your ``microblog`` folder create a ``microblog_tests.py`` file.
222+
223+
.. class:: incremental
224+
225+
Open it in your editor.
222226

223227

224228
Testing Setup
@@ -745,17 +749,21 @@ Run Your Tests
745749
Make Them Pass
746750
--------------
747751

748-
Now we have 4 tests, and two fail, add this function to ``microblog.py``:
752+
Now we have 4 tests, and two fail.
753+
754+
.. class:: incremental
755+
756+
add the ``get_all_entries`` function to ``microblog.py``:
749757

750758
.. code-block:: python
751-
:class: small
759+
:class: small incremental
752760
753761
def get_all_entries():
754762
con = get_database_connection()
755763
cur = con.execute('SELECT title, text FROM entries ORDER BY id DESC')
756764
return [dict(title=row[0], text=row[1]) for row in cur.fetchall()]
757765
758-
.. container:: incremental small
766+
.. container:: incremental
759767

760768
And back in your terminal:
761769

@@ -789,10 +797,16 @@ We've moved quite a ways in implementing our microblog:
789797
We're ready now to put a face on it, so we can see what we're doing!
790798

791799

800+
Break Time
801+
----------
802+
803+
But first, let's take a quick break to clear our heads.
804+
805+
792806
Templates In Flask
793807
------------------
794808

795-
First, though, a detour into templates as they work in Flask
809+
We'll start with a detour into templates as they work in Flask
796810

797811
.. container:: incremental
798812

@@ -1275,7 +1289,7 @@ Login Form Template
12751289

12761290
Add ``login.html`` to the ``templates`` directory:
12771291

1278-
.. code-block: jinja
1292+
.. code-block:: jinja
12791293
:class: tiny
12801294
12811295
{% extends "layout.html" %}

0 commit comments

Comments
 (0)