Exemple #1
0
    def test_it_returns_the_given_logo_unmodified(self):
        logo = organizations.organization_logo(mock.sentinel.logo,
                                               mock.sentinel.request)

        assert logo == mock.sentinel.logo
Exemple #2
0
    def test_it_raises_a_NotFound_error_for_no_logo(self,
                                                    organization_context):
        organization_context.organization.logo = None

        with pytest.raises(NotFound):
            organization_logo(organization_context, mock.sentinel.request)
Exemple #3
0
    def test_it_returns_the_given_logo_unmodified(self):
        logo = organizations.organization_logo(
            mock.sentinel.logo, mock.sentinel.request
        )

        assert logo == mock.sentinel.logo
Exemple #4
0
    def test_it_returns_the_logo(self, organization_context):
        organization_context.organization.logo = "some logo content"
        result = organization_logo(organization_context, mock.sentinel.request)

        assert result == organization_context.organization.logo