Add py311 in tox file

Add py311 in tox file

Change-Id: Ib62a630ac44fef514191f5f90be5bfaeb9461002
This commit is contained in:
Hemanth Nakkina 2023-10-20 05:06:53 +05:30
parent cf3c884ae2
commit 0764214734
2 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,9 @@
"""Tests for glance charm."""
import ops_sunbeam.test_utils as test_utils
from mock import (
patch,
)
import charm
@ -49,6 +52,10 @@ class TestGlanceOperatorCharm(test_utils.CharmTestCase):
self.harness = test_utils.get_harness(
_GlanceOperatorCharm, container_calls=self.container_calls
)
mock_get_platform = patch(
"charmhelpers.osplatform.get_platform", return_value="ubuntu"
)
mock_get_platform.start()
# clean up events that were dynamically defined,
# otherwise we get issues because they'll be redefined,
@ -67,6 +74,7 @@ class TestGlanceOperatorCharm(test_utils.CharmTestCase):
except AttributeError:
pass
self.addCleanup(mock_get_platform.stop)
self.addCleanup(self.harness.cleanup)
test_utils.add_complete_ingress_relation(self.harness)

View File

@ -75,6 +75,10 @@ deps = {[testenv:py3]deps}
basepython = python3.10
deps = {[testenv:py3]deps}
[testenv:py311]
basepython = python3.11
deps = {[testenv:py3]deps}
[testenv:cover]
basepython = python3
deps = {[testenv:py3]deps}