Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock get_platform / add CHARMHELPERS_IN_UNITTEST #862

Closed
wants to merge 2 commits into from

Commits on Oct 23, 2023

  1. Mock get_platform / add CHARMHELPERS_IN_UNITTEST

    Patch osplatform.get_platform() to return "ubuntu" if the environment
    variable CHARMHELPERS_IN_UNITTEST is set to something truthy. This is to
    enable unit testing in classic charms on NON ubuntu systems (e.g. Debian
    bookworm) where the function is often called via a decorator that is
    evaluated at module load time and thus is very, very tricky to mock out,
    as it is often 'hit' during the test discovery phase.
    ajkavanagh committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    9333fea View commit details
    Browse the repository at this point in the history
  2. Fix pep8 issues

    ajkavanagh committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    cec2095 View commit details
    Browse the repository at this point in the history