Skip to content

Commit 7aece67

Browse files
jcs-instructornitsanavni4dsherwoodkevinmaesmander11
committed
. t Example using mock DB
Co-Authored-By: Nitsan Avni <nitsanav@gmail.com> Co-Authored-By: Joel Silberman <42779942+jcs-instructor@users.noreply.github.com> Co-Authored-By: 4dsherwood <4dsherwood@users.noreply.github.com> Co-Authored-By: Kevin Maes <kevin@kevinmaes.com> Co-Authored-By: Matt <matthew.anderson11@gmail.com>
1 parent da85224 commit 7aece67

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

katas/fizzbuzz/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*cache*

katas/fizzbuzz/test_fizzbuzz.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import mongomock
2+
import pytest
3+
4+
@pytest.fixture
5+
def mock_mongo_client():
6+
return mongomock.MongoClient()
7+
8+
def test_example_using_mock_db(mock_mongo_client):
9+
db = mock_mongo_client.mydatabase
10+
collection = db.ourcollection
11+
12+
collection.insert_one({"name": "John", "age": 30})
13+
result = collection.find_one({"name": "John"})
14+
15+
assert result["age"] == 30

session-notes/session-notes-2024-04-18.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,36 @@ Retro Notes go here:
4646

4747
### Mid-Session Retro 1 (1 minute per person - what liked/disliked & propose changes)
4848

49+
Kevin
50+
- Liked the feeling. Time went quickly. Rotation gave everyone a chance. Liked tooling in a browser window, VSCode.
51+
- Liked working with the tests & quick & dirty DB, looked promising.
52+
- Overall positive.
53+
54+
Matt
55+
- A little nervous - a lot of people this time; previously was fewer people. Never used GitPod before, a little stressful.
56+
- Liked - very cool to try using DB with FizzBuzz.
57+
- Felt guilty suggesting ChatGPT, not sure if a faux pas. (Mob response: Not a problem at all; it's helpful, just up to the Talker to go along or not. Totally fine to take time on something new - or anyting. The time takes what it takes)
58+
59+
Nitsan
60+
- What we're working on is less clear than usual
61+
- When should we connect to a DB? etc.
62+
- We just said let's do FizzBuzz and see if we can use a DB; a vaguer problem space
63+
- Liked more people today, awesome; wish they could've stayed long
64+
65+
Diana
66+
- Really fun. Like using DB for FizzBuzz.
67+
- Did later have an opinion on which DB, but still not sure.
68+
- Going well
69+
- Curious about DB, like using python since team is using it
70+
71+
Joel
72+
- Liked meeting Kevin and having Matt come back
73+
- In retrospect - maybe start with requirements; let the DB be introduced using TDD
74+
- Eager to see how it will come out
75+
- Onboarding process - try to get to coding quickly, and use a simple problem
76+
- Love talking Spanish with the mob!
77+
78+
4979
### Mid-Session Retro 2 (1 minute per person - what liked/disliked & propose changes)
5080

5181
### Final Retro

0 commit comments

Comments
 (0)