Skip to content

Commit

Permalink
test(object): add test for __dir__ duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
spyoungtech committed Apr 21, 2021
1 parent 5bf7525 commit a8e591f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gitlab/tests/test_base.py
Expand Up @@ -135,6 +135,10 @@ def test_update_attrs_deleted(self, fake_manager):
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"),)
Expand Down

0 comments on commit a8e591f

Please sign in to comment.