Modules

test_cases.main module

class test_cases.main.Foo[source]

Bases: IHero

eating_banana() str[source]
just_call_for() str[source]
just_says() str[source]
nickname: str = 'Bob'
wearing_pyjama() str[source]
class test_cases.main.TestMyHeroes[source]

Bases: MockerBuilder

Main Test Class to implement MockerBuilder features to make your tests

mocker_builder_setup(mocker: MockerFixture)

Decorator which inject a fixture to the TestClass method decorated with this so we can get the mocker fixture injected to be used all spread on the tests.

Args:
test_main_class:

The pytest main TestClass which runs all tests.

mocker:

pytest-mock fixture to create patch and so on.

test_another_print_io()[source]
async test_call_heroes()[source]
test_create_my_heroes_method_runtime()[source]
async test_heroes_sleeping()[source]
test_how_can_we_call_for_heores()[source]
test_io()[source]
test_mock_justice_league__init__()[source]
test_mock_my_class()[source]
test_mock_my_hero_attribute()[source]
test_mock_my_heroes_class()[source]
test_mock_my_heroes_module()[source]
test_mock_ugly_hero()[source]
test_my_hero_batman()[source]
test_my_hero_robin()[source]
test_robin_becomes_batman()[source]
test_set_result_return_value()[source]
test_set_result_side_effect()[source]
async test_what_i_do_when_nobody_is_looking()[source]
test_cases.main.print_io_test()[source]

test_cases.my_heroes module

class test_cases.my_heroes.Batman(bananas: 'int' = 5, pyjamas: 'int' = 1, nickname: 'str' = 'Big Fat Bat', my_hobby: 'HobbyHero' = None)[source]

Bases: IHero

bananas: int = 5
eating_banana()[source]
just_call_for()[source]
just_says()[source]
my_hobby: HobbyHero = None
nickname: str = 'Big Fat Bat'
pyjamas: int = 1
wearing_pyjama()[source]
class test_cases.my_heroes.FakeHero(bananas: 'int' = 2, pyjamas: 'int' = 2, nickname: 'str' = 'Bad Fat Hero', my_hobby: 'HobbyHero' = None)[source]

Bases: IHero

bananas: int = 2
eating_banana()[source]
just_call_for()[source]
just_says()[source]
my_hobby: HobbyHero = None
nickname: str = 'Bad Fat Hero'
pyjamas: int = 2
to_dict()[source]
wearing_pyjama()[source]
class test_cases.my_heroes.IHero[source]

Bases: ABC

bananas: int
abstract eating_banana() str[source]
get_my_hero_hobby() IHeroHobby[source]
abstract just_call_for() str[source]
abstract just_says() str[source]
my_hobby: HobbyHero
nickname: str
pyjamas: int
set_my_hero_hobby(hobby: str)[source]
abstract wearing_pyjama() str[source]
async what_i_do_when_nobody_is_looking() IHeroHobby[source]
async classmethod which_hero_i_am()[source]
class test_cases.my_heroes.JusticeLeague[source]

Bases: object

async are_heroes_sleeping()[source]
async call_everybody()[source]
async call_heroes()[source]
how_can_we_call_for_heores()[source]
join_hero(hero: IHero)[source]
show_heroes()[source]
what_heroes_does()[source]
class test_cases.my_heroes.MyHeroes[source]

Bases: object

does() str[source]
is_eating_banana() str[source]
is_wearing_pyjama() str[source]
just_call_for() str[source]
just_says() str[source]
property my_hero: IHero
run_created_runtime_method()[source]
set_what_my_hero_does(hobby: str)[source]
async what_my_hero_does_when_nobody_is_looking()[source]
who_is_my_hero()[source]
class test_cases.my_heroes.PeakyBlinder(bananas: 'int' = 3, pyjamas: 'int' = 2, nickname: 'str' = 'Bart Burp', my_hobby: 'HobbyHero' = None)[source]

Bases: IHero

bananas: int = 3
eating_banana()[source]
just_call_for()[source]
just_says()[source]
my_hobby: HobbyHero = None
nickname: str = 'Bart Burp'
pyjamas: int = 2
wearing_pyjama()[source]
class test_cases.my_heroes.Robin(bananas: 'int' = 1, pyjamas: 'int' = 4, nickname: 'str' = 'Little Bastard', my_hobby: 'HobbyHero' = None)[source]

Bases: IHero

bananas: int = 1
eating_banana()[source]
just_call_for()[source]
just_says()[source]
my_hobby: HobbyHero = None
nickname: str = 'Little Bastard'
pyjamas: int = 4
wearing_pyjama()[source]
test_cases.my_heroes.who_is_my_hero(_my_hero: Optional[IHero] = None)[source]
test_cases.my_heroes.who_is_the_best_hero()[source]

Module contents