-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 refactor: rename BoolMother to BooleanMother for consistency and cl…
…arity
- Loading branch information
1 parent
b125b36
commit 6fa161c
Showing
5 changed files
with
26 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
""" | ||
Test module for the BoolMother class. | ||
Test module for the BooleanMother class. | ||
""" | ||
|
||
from pytest import raises as assert_raises | ||
|
||
from object_mother_pattern.mothers import BoolMother | ||
from object_mother_pattern.mothers import BooleanMother | ||
|
||
|
||
def test_bool_mother_happy_path() -> None: | ||
""" | ||
Test BoolMother happy path. | ||
Test BooleanMother happy path. | ||
""" | ||
value = BoolMother.create() | ||
value = BooleanMother.create() | ||
|
||
assert type(value) is bool | ||
|
||
|
||
def test_bool_mother_value() -> None: | ||
""" | ||
Test BoolMother create method with value. | ||
Test BooleanMother create method with value. | ||
""" | ||
value = BoolMother.create() | ||
value = BooleanMother.create() | ||
|
||
assert BoolMother.create(value=value) == value | ||
assert BooleanMother.create(value=value) == value | ||
|
||
|
||
def test_bool_mother_invalid_type() -> None: | ||
""" | ||
Test BoolMother create method with invalid type. | ||
Test BooleanMother create method with invalid type. | ||
""" | ||
assert type(BoolMother.invalid_type()) is not bool | ||
assert type(BooleanMother.invalid_type()) is not bool | ||
|
||
|
||
def test_bool_mother_invalid_value_type() -> None: | ||
""" | ||
Test BoolMother create method with invalid value type. | ||
Test BooleanMother create method with invalid value type. | ||
""" | ||
with assert_raises( | ||
expected_exception=TypeError, | ||
match='BoolMother value must be a boolean.', | ||
match='BooleanMother value must be a boolean.', | ||
): | ||
BoolMother.create(value=BoolMother.invalid_type()) | ||
BooleanMother.create(value=BooleanMother.invalid_type()) |