diff options
author | Max Wittig <max.wittig@siemens.com> | 2020-10-12 22:31:55 +0200 |
---|---|---|
committer | Max Wittig <max.wittig@siemens.com> | 2020-10-12 22:38:02 +0200 |
commit | e1e0d8cbea1fed8aeb52b4d7cccd2e978faf2d3f (patch) | |
tree | 1025d99639dcbf521e080e69a401476d08338fac /gitlab/tests/test_base.py | |
parent | 3a38c6d78ceaed1116ebbdd8e5cded60c99c6f95 (diff) | |
download | gitlab-fix/delete-attr.tar.gz |
fix(base): really refresh objectfix/delete-attr
This fixes and error, where deleted attributes would not show up
Fixes #1155
Diffstat (limited to 'gitlab/tests/test_base.py')
-rw-r--r-- | gitlab/tests/test_base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gitlab/tests/test_base.py b/gitlab/tests/test_base.py index 58c0d47..a0adcb0 100644 --- a/gitlab/tests/test_base.py +++ b/gitlab/tests/test_base.py @@ -128,6 +128,13 @@ class TestRESTObject: assert {"foo": "foo", "bar": "bar"} == obj._attrs assert {} == obj._updated_attrs + def test_update_attrs_deleted(self, fake_manager): + obj = FakeObject(fake_manager, {"foo": "foo", "bar": "bar"}) + obj.bar = "baz" + obj._update_attrs({"foo": "foo"}) + assert {"foo": "foo"} == obj._attrs + assert {} == obj._updated_attrs + def test_create_managers(self, fake_gitlab, fake_manager): class ObjectWithManager(FakeObject): _managers = (("fakes", "FakeManager"),) |