From 72900998a204839f1d5aa6b9a69e4e9d089b2f48 Mon Sep 17 00:00:00 2001 From: sed-i <82407168+sed-i@users.noreply.github.com> Date: Fri, 25 Nov 2022 15:18:17 -0500 Subject: [PATCH] Use copy for better clarity of intention --- tests/unit/test_lib_per_unit_requires.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_lib_per_unit_requires.py b/tests/unit/test_lib_per_unit_requires.py index cdef9b2c..4a3fd0de 100644 --- a/tests/unit/test_lib_per_unit_requires.py +++ b/tests/unit/test_lib_per_unit_requires.py @@ -1,6 +1,7 @@ # Copyright 2022 Canonical Ltd. # See LICENSE file for licensing details. import unittest +from copy import copy from textwrap import dedent import pytest @@ -220,7 +221,7 @@ class RequirerCharm(CharmBase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.ipu = IngressPerUnitRequirer(self, relation_name="ingress", port=80) - self.dependee = {"value": self.ipu.url} # Stand-in for interlib dependency + self.dependee = {"value": copy(self.ipu.url)} # Stand-in for interlib dependency def setUp(self): self.harness = Harness(self.RequirerCharm, meta=self.RequirerCharm.META)