Skip to content

test: add wrapper and filter tests FAN-58 - #6

Merged
MaferMazu merged 9 commits into
nau/lilac.masterfrom
dev/add-filter-tests
Sep 30, 2022
Merged

test: add wrapper and filter tests FAN-58#6
MaferMazu merged 9 commits into
nau/lilac.masterfrom
dev/add-filter-tests

Conversation

@MaferMazu

@MaferMazu MaferMazu commented Sep 15, 2022

Copy link
Copy Markdown
Contributor

Description

This PR adds tests for the PR #5

  • Add pytest and coverage to test.in and update requirements (I use python 3.8, pip 20.0.1, and pip-tools 5.3.1).
  • Add support for python 3.10 in tox.
  • Add backends for tests.
  • Add wrappers test.
  • Add pipeline module unit tests.
  • Correct the test execution by creating an email_module_l_v1 backend and adding it to the plugin settings.
  • Add some pylint disable comments.

How to test

  • In the terminal run
    export DJANGO_SETTINGS_MODULE='nau_openedx_extensions.settings.test'
  • Then, make tests
    make python-test

Notes for next steps and later improvements

  • Run quality test returns an error because there are a lot of Pylint errors (If you want to test quality, you can use pylint <file-name>)
  • To avoid exporting DJANGO_SETTINGS_MODULE when running unit tests and set it automatically, you need to do it in the Pytest configurations files. I can't use pytest-django because some models import Openedx platform features directly and don't have a backend in the wrappers.
  • Drop support for Django 22

@MaferMazu
MaferMazu force-pushed the dev/add-filter-tests branch 2 times, most recently from 86a052a to acb3e4c Compare September 16, 2022 05:15
@MaferMazu
MaferMazu force-pushed the dev/add-filter-tests branch 2 times, most recently from 5d650a4 to a619516 Compare September 25, 2022 22:14
@MaferMazu
MaferMazu force-pushed the dev/add-filters-to-restrict-enrollment branch from 4c013ac to 7326f36 Compare September 26, 2022 18:52
@MaferMazu
MaferMazu marked this pull request as ready for review September 27, 2022 13:35
@MaferMazu
MaferMazu force-pushed the dev/add-filters-to-restrict-enrollment branch from 7326f36 to 584b110 Compare September 28, 2022 04:01
@MaferMazu
MaferMazu changed the base branch from dev/add-filters-to-restrict-enrollment to nau/lilac.master September 28, 2022 04:23
@MaferMazu MaferMazu changed the title test: add wrapper and filter tests test: add wrapper and filter tests FAN-58 Sep 28, 2022
@felipemontoya

Copy link
Copy Markdown
Member

@MaferMazu do you run this tests from the tutor dev bash? Or are you running the out of the containers?

@MaferMazu

MaferMazu commented Sep 29, 2022

Copy link
Copy Markdown
Contributor Author

@felipemontoya I ran it out of the containers

@felipemontoya felipemontoya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is better to merge this sooner rather than waiting for long with the branch open

@MaferMazu
MaferMazu merged commit c37bbee into nau/lilac.master Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants