summaryrefslogtreecommitdiff
path: root/gitlab/tests
diff options
context:
space:
mode:
authorSpencer Phillip Young <spencer.young@spyoung.com>2021-04-21 09:43:44 -0700
committerSpencer Phillip Young <spencer.young@spyoung.com>2021-04-21 09:59:23 -0700
commita8e591f742f777f8747213b783271004e5acc74d (patch)
treeee0a40af8ce01a99cf7f783ad64f490ca988119d /gitlab/tests
parent5bf7525d2d37968235514d1b93a403d037800652 (diff)
downloadgitlab-a8e591f742f777f8747213b783271004e5acc74d.tar.gz
test(object): add test for __dir__ duplicates
Diffstat (limited to 'gitlab/tests')
-rw-r--r--gitlab/tests/test_base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gitlab/tests/test_base.py b/gitlab/tests/test_base.py
index a0adcb0..6ca261d 100644
--- a/gitlab/tests/test_base.py
+++ b/gitlab/tests/test_base.py
@@ -135,6 +135,10 @@ class TestRESTObject:
assert {"foo": "foo"} == obj._attrs
assert {} == obj._updated_attrs
+ def test_dir_unique(self, fake_manager):
+ obj = FakeObject(fake_manager, {"manager": "foo"})
+ assert len(dir(obj)) == len(set(dir(obj)))
+
def test_create_managers(self, fake_gitlab, fake_manager):
class ObjectWithManager(FakeObject):
_managers = (("fakes", "FakeManager"),)