summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-09-08 20:40:32 +0200
committerGitHub <noreply@github.com>2021-09-08 20:40:32 +0200
commit5247e8bc5298bc017e117e1bfa6717183d07827f (patch)
treecf17de5ed2eb222375589ff7c76b1087fd05c7b8 /tests
parentb8a47bae3342400a411fb9bf4bef3c15ba91c98e (diff)
parent487b9a875a18bb3b4e0d49237bb7129d2c6dba2f (diff)
downloadgitlab-5247e8bc5298bc017e117e1bfa6717183d07827f.tar.gz
Merge pull request #1512 from JohnVillalovos/jlvillal/type_managers
chore: improve type-hinting for managers
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/api/test_merge_requests.py10
-rw-r--r--tests/unit/test_base.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/functional/api/test_merge_requests.py b/tests/functional/api/test_merge_requests.py
index 179ae6f..b20b66a 100644
--- a/tests/functional/api/test_merge_requests.py
+++ b/tests/functional/api/test_merge_requests.py
@@ -125,10 +125,18 @@ def test_merge_request_should_remove_source_branch(
time.sleep(0.5)
assert mr.merged_at is not None
time.sleep(0.5)
+ result = wait_for_sidekiq(timeout=60)
+ assert result is True, "sidekiq process should have terminated but did not"
# Ensure we can NOT get the MR branch
with pytest.raises(gitlab.exceptions.GitlabGetError):
- project.branches.get(source_branch)
+ result = project.branches.get(source_branch)
+ # Help to debug in case the expected exception doesn't happen.
+ import pprint
+
+ print("mr:", pprint.pformat(mr))
+ print("mr.merged_at:", pprint.pformat(mr.merged_at))
+ print("result:", pprint.pformat(result))
def test_merge_request_large_commit_message(
diff --git a/tests/unit/test_base.py b/tests/unit/test_base.py
index 8872dbd..cccdfad 100644
--- a/tests/unit/test_base.py
+++ b/tests/unit/test_base.py
@@ -147,7 +147,7 @@ class TestRESTObject:
def test_create_managers(self, fake_gitlab, fake_manager):
class ObjectWithManager(FakeObject):
- _managers = (("fakes", "FakeManager"),)
+ fakes: "FakeManager"
obj = ObjectWithManager(fake_manager, {"foo": "bar"})
obj.id = 42