Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroPasotti authored and rwcarlsen committed Jun 29, 2022
1 parent c500f87 commit 5e5660a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ops/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
from io import BytesIO, StringIO
from textwrap import dedent

import ops.model
from ops import charm, framework, model, pebble, storage
from ops._private import yaml

Expand Down Expand Up @@ -650,7 +649,8 @@ def add_relation_unit(self, relation_id: int, remote_unit_name: str) -> None:
None
"""
self._backend._relation_list_map[relation_id].append(remote_unit_name)
self._backend._relation_data[relation_id][remote_unit_name] = {}
rel_data = self._backend._relation_data
rel_data[relation_id][remote_unit_name] = _TestingRelationDataContents()
# TODO: jam 2020-08-03 This is where we could assert that the unit name matches the
# application name (eg you don't have a relation to 'foo' but add units of 'bar/0'
self._backend._relation_app_and_units[relation_id]["units"].append(remote_unit_name)
Expand Down
2 changes: 1 addition & 1 deletion test/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import yaml

import ops.testing
from ops import pebble, model
from ops import model, pebble
from ops.charm import (
CharmBase,
PebbleReadyEvent,
Expand Down

0 comments on commit 5e5660a

Please # to comment.