Closed ZuluPro closed 5 years ago
@fdemmer Any news ?
first of all, thank you for contributing, your time and effort is appreciated! :+1:
i am not sure about the pull-request as is though. i am a "purist" in the sense, that i think "less code is more". every line added potentially adds bugs and needs to be maintained. sometimes it is good to take a step back and ask, what do i want, what do i need to focus on and then only do that.
the pull-request adds a whole test project only to have one test actually run and that test mostly verifies that django and the test-project itself works. it does not verify any of the expected response headers (and you left a set_trace()
in there).
so, i am going to reject the pull-request.
however, i also think tests are important. they must focus on testing what the library does though and should not cover aspects out of its control.
i am thinking tests should:
settings.configure()
and django.setup()
should be enough to have a "django instance" if neccessary; a django project can be super-small; having url routing to test a view function is already too much)WeasyTemplateResponseMixin
and their effects
base_url
is passed to weasyprintdjango_url_fetcher()
returns correct paths to static and media filesthanks again for contributing!
I added: