Skip to content

Commit 8f12053

Browse files
Update content
1 parent c0e2959 commit 8f12053

File tree

1 file changed

+4
-4
lines changed
  • guide/getting-started-with-testcontainers-for-python

1 file changed

+4
-4
lines changed

guide/getting-started-with-testcontainers-for-python/index.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tags:
1414
:codebase: https://raw.githubusercontent.com/testcontainers/tc-guide-getting-started-with-testcontainers-for-python/main
1515

1616
Testcontainers is an open-source framework for provisioning throwaway, on-demand containers for development and testing use cases.
17-
Testcontainers makes it easy to work with databases, message brokers, web browsers, or just about anything
17+
Testcontainers make it easy to work with databases, message brokers, web browsers, or just about anything
1818
that can run in a Docker container.
1919

2020
Using Testcontainers, you can write tests talking to the same type of services you use in production
@@ -58,7 +58,7 @@ Once the dependencies are installed, we have used *pip freeze* command to genera
5858
so that others can install the same versions of packages simply using *pip install -r requirements.txt*.
5959

6060
== Implement Database Helper
61-
Let's create *db/connection.py* file and create a function to get database connection as follows:
61+
Let's create *db/connection.py* file and create a function to get a database connection as follows:
6262

6363
[source,python]
6464
----
@@ -118,7 +118,7 @@ def setup():
118118
# teardown code
119119
----
120120

121-
However, with this approach, if there is an exception occurred in the setup code, the teardown code will not be executed. So, a better approach is to use https://pytest.org/en/7.4.x/how-to/fixtures.html#adding-finalizers-directly[finalizers] as follows:
121+
However, with this approach, if there is an exception occurs in the setup code, the teardown code will not be executed. So, a better approach is to use https://pytest.org/en/7.4.x/how-to/fixtures.html#adding-finalizers-directly[finalizers] as follows:
122122

123123
[source,python]
124124
----
@@ -156,7 +156,7 @@ include::{codebase}/tests/test_customers.py[lines="32..44"]
156156
* In the *test_get_all_customers()* test, we are inserting two customer records into the database,
157157
fetching all the existing customers, and asserting the number of customers.
158158
* In the *test_get_customer_by_email()* test, we are inserting a customer record into the database,
159-
fetching the customer by email, and asserting the customer details.
159+
fetch the customer by email, and asserting the customer details.
160160

161161
As we are deleting all the customer records before every test, the tests can be run in any order.
162162

0 commit comments

Comments
 (0)