Skip to content

Commit ac188d5

Browse files
jcs-instructorgregorrieglernitsanavni4dsherwoodmander11
committed
- F use word from DB
Co-Authored-By: Gregor Riegler <rieglerg85@gmail.com> 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: Matt <matthew.anderson11@gmail.com>
1 parent 82f1966 commit ac188d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

katas/fizzbuzz/test_fizzbuzz.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ def test_buzz_divisor_is_5(fizzbuzz_db):
5555
# todo: move this production code to another file later:
5656
def make_fizzbuzz(db) -> FizzbuzzFn:
5757
def fizzbuzz_fn(number):
58-
# TODO: get the rule from the db for 5
5958
divisor = 5
60-
word = "Buzz"
59+
word = db.fizzbuzz_rules.find_one({"divisor": divisor})["word"]
6160
if number == divisor:
6261
return word
6362
return "Fizz"
@@ -74,7 +73,7 @@ def test_buzz(fizzbuzz_db):
7473
fizzbuzz_fn = make_fizzbuzz(fizzbuzz_db)
7574
assert "Buzz" == fizzbuzz_fn(5)
7675

77-
def skip_test_different_rules(fizzbuzz_db):
76+
def test_different_rules(fizzbuzz_db):
7877
rules = fizzbuzz_db.fizzbuzz_rules
7978
rules.delete_many(filter={})
8079
rules.insert_many(

0 commit comments

Comments
 (0)