Skip to content

Commit f77deb6

Browse files
committed
bumped ops version
1 parent 2ee6443 commit f77deb6

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Run tests
2828
run: tox -e pydantic no-pydantic
2929
static:
30-
name: Unit tests
30+
name: Static code check
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Checkout

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ops
1+
ops==1.5.0

test/test_wrapped_event.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def test_wrapped_events(charm):
8484
charm.foo._model.relations._data['foo'] = (relation, )
8585

8686
def assert_wrapped(self, event):
87-
assert self.foo.current.relation is relation
87+
assert self.foo.current.relation.name == 'foo'
88+
assert self.foo.current.relation.id == 1
8889

8990
charm._callback = assert_wrapped
9091

test/types/test_types.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class LAM:
6262
Req_DBM = DataBagModel(unit=LUM, app=LAM)
6363
template = Template(provider=Prov_DBM, requirer=Req_DBM)
6464
foo = Endpoint(charm, "relation_name", requirer_template=template)
65-
relation = foo.wrap(charm.model.relations[0])
65+
relation = foo.wrap(charm.model.relations['relation_name'][0])
6666

6767
valid = relation._remote_app_data_valid
6868

@@ -93,7 +93,7 @@ class RUM:
9393
charm = CharmBase(None) # type: ignore
9494

9595
foo_req = Endpoint(charm, "relation_name", requirer_template=template)
96-
req_relation = foo_req.wrap(charm.model.relations[0])
96+
req_relation = foo_req.wrap(charm.model.relations['relation_name'][0])
9797
req_remote_unit_data = req_relation.remote_units_data[req_relation.remote_units[0]]
9898
req_value_foo = req_remote_unit_data.foo
9999
req_value_bar = req_remote_unit_data.bar
@@ -109,7 +109,7 @@ class RUM:
109109
charm = CharmBase(None) # type: ignore
110110

111111
foo_prov = Endpoint(charm, "relation_name", provider_template=template)
112-
prov_relation = foo_prov.wrap(charm.model.relations[0])
112+
prov_relation = foo_prov.wrap(charm.model.relations['relation_name'][0])
113113
prov_remote_unit_data = prov_relation.remote_units_data[
114114
prov_relation.remote_units[0]
115115
]

0 commit comments

Comments
 (0)