Esempio n. 1
0
    def it_can_get_a_style_id_from_a_style(self, _get_style_id_from_style_):
        style = BaseStyle(None)
        style_type = 22
        _get_style_id_from_style_.return_value = "StyleId"
        styles = Styles(None)

        style_id = styles.get_style_id(style, style_type)

        _get_style_id_from_style_.assert_called_once_with(
            styles, style, style_type)
        assert style_id == "StyleId"
Esempio n. 2
0
    def and_it_can_get_a_style_id_from_a_style_name(self,
                                                    _get_style_id_from_name_):
        style_type = 22
        _get_style_id_from_name_.return_value = "StyleId"
        styles = Styles(None)

        style_id = styles.get_style_id("Style Name", style_type)

        _get_style_id_from_name_.assert_called_once_with(
            styles, "Style Name", style_type)
        assert style_id == "StyleId"
Esempio n. 3
0
    def but_it_returns_None_for_a_style_or_name_of_None(self):
        styles = Styles(None)

        style_id = styles.get_style_id(None, style_type=22)

        assert style_id is None