Skip to content

[IMPROVEMENT] Find a way to mock template_renderer #305

Open
@thealphadollar

Description

Please prefix your issue with one of the following: [BUG], [PROPOSAL], [QUESTION].

Sample platform commit (found at the bottom of each page) : X.X.X

In raising this issue, I confirm the following (please check boxes, eg [X]):

  • I have read and understood the contributors guide.
  • I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked that the issue I'm posting isn't already reported.
  • I have checked that the issue I'm posting isn't already solved and no duplicates exist in closed issues and in opened issues
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.

My familiarity with the project is as follows (check one, eg [X]):

  • I have never visited/used the platform.
  • I have used the platform just a couple of times.
  • I have used the platform extensively, but have not contributed previously.
  • I am an active contributor to the platform.

Unittests for mod_auth were added in #302 but we were not able to mock template_renderer which decorates a lot of the functions and due to this the testing is not rigorous.

Here is an example testcase which fails to mock template_renderer.

A way is required to mock the same and improve the testing.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions