def it_can_get_a_style_of_type_by_id(self, _get_by_id_, style_): style_id, style_type = 42, 7 _get_by_id_.return_value = style_ styles = Styles(None) style = styles.get_by_id(style_id, style_type) _get_by_id_.assert_called_once_with(styles, style_id, style_type) assert style is style_
def but_it_returns_the_default_style_for_style_id_None( self, default_, style_): style_type = 17 default_.return_value = style_ styles = Styles(None) style = styles.get_by_id(None, style_type) default_.assert_called_once_with(styles, style_type) assert style is style_