Getting started with pytest Transcripts
Chapter: Welcome to the course
Lecture: The cards app

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Talking about pytest would be a little dry if we didn't have an application to
0:05 test, I've developed cards and cards is a small command line interface application.
0:10 The intent is for a team task tracking but that's really just the example the intent
0:15 of cards is a learning tool but I'm showing here exactly what it does.
0:19 So it's a command line thing you say card like for instance if you've got nothing in there yet you can say cards add,
0:24 do something and assign an owner of brian and then I've added something else and then
0:31 cards without any extra commands will just list what cards you have and shown here. I've just got shown the list of cards in there.
0:40 There's two you show the ID. What state it's in if there's an owner in the summary and that's about it.
0:45 The reason I chose cards is because it's fairly representative of many applications that you might be testing in the future.
0:54 So cards is layered, there's a user interface in this case, a command line interface, there's an API layer which is really all the logic in
1:02 the guts of the application. That's not always true. Sometimes an API
1:06 Is on top of other application logic and then there's a database layer to save all the data to in this case into a file.
1:14 It's simple but not too simple. We will test it both as a library through the API. That is most of the courses. Talking about testing through the API.
1:23 But we'll take a brief look at testing as the system through CLI.


Talk Python's Mastodon Michael Kennedy's Mastodon