Exemplo n.º 1
0
def test_response_supports_dynamic_attributes():
    response = Response(200)
    foo = object()

    assert hasattr(response, 'response') is False, 'This test makes sense if such attribute is not defined'
    response.foo = foo
    assert response.foo is foo
Exemplo n.º 2
0
def test_response_supports_dynamic_attributes():
    response = Response(200)
    foo = object()

    assert (hasattr(response, "response") is
            False), "This test makes sense if such attribute is not defined"
    response.foo = foo  # type: ignore
    assert response.foo is foo  # type: ignore