File size: 8,493 Bytes
d61821a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  "commit": "175b355d84d54a71f15fe3601c5275dc35984b9b",
  "parent": "de29503262b7626421f3bffeea3ff073e63e3865",
  "repository_id": "R003",
  "schema_version": 1,
  "task_id": "TASK_S2_R003_002",
  "valid_end_to_end": true,
  "validation": {
    "commands": [
      "python -m pytest -q tests/unit/objects"
    ],
    "elapsed_seconds": 1.5484836669638753,
    "gold": [
      {
        "command": "python -m pytest -q tests/unit/objects",
        "elapsed_seconds": 0.4453242919407785,
        "returncode": 0,
        "stderr": "",
        "stdout": ".....................................................................s.. [ 20%]\ns....................................................................... [ 40%]\n........................................................................ [ 60%]\n.....s.................................................................. [ 80%]\n....................................................................     [100%]\n353 passed, 3 skipped in 0.27s\n",
        "timed_out": false
      }
    ],
    "hidden": [
      {
        "command": "python -m pytest -q tests/unit/objects",
        "elapsed_seconds": 0.4627318340353668,
        "returncode": 1,
        "stderr": "",
        "stdout": "_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Project id:1>, name = 'external_status_checks'\n\n    def __getattr__(self, name: str) -> Any:\n        if name in self.__dict__[\"_updated_attrs\"]:\n            return self.__dict__[\"_updated_attrs\"][name]\n    \n        if name in self.__dict__[\"_attrs\"]:\n            value = self.__dict__[\"_attrs\"][name]\n            # If the value is a list, we copy it in the _updated_attrs dict\n            # because we are not able to detect changes made on the object\n            # (append, insert, pop, ...). Without forcing the attr\n            # creation __setattr__ is never called, the list never ends up\n            # in the _updated_attrs dict, and the update() and save()\n            # method never push the new data to the server.\n            # See https://github.com/python-gitlab/python-gitlab/issues/306\n            #\n            # note: _parent_attrs will only store simple values (int) so we\n            # don't make this check in the next block.\n            if isinstance(value, list):\n                self.__dict__[\"_updated_attrs\"][name] = value[:]\n                return self.__dict__[\"_updated_attrs\"][name]\n    \n            return value\n    \n        if name in self.__dict__[\"_parent_attrs\"]:\n            return self.__dict__[\"_parent_attrs\"][name]\n    \n        message = f\"{type(self).__name__!r} object has no attribute {name!r}\"\n        if self._created_from_list:\n            message = (\n                f\"{message}\\n\\n\"\n                + textwrap.fill(\n                    f\"{self.__class__!r} was created via a list() call and \"\n                    f\"only a subset of the data may be present. To ensure \"\n                    f\"all data is present get the object using a \"\n                    f\"get(object.id) call. For more details, see:\"\n                )\n                + f\"\\n\\n{_URL_ATTRIBUTE_ERROR}\"\n            )\n        elif self._lazy:\n            message = f\"{message}\\n\\n\" + textwrap.fill(\n                f\"If you tried to access object attributes returned from the server, \"\n                f\"note that {self.__class__!r} was created as a `lazy` object and was \"\n                f\"not initialized with any data.\"\n            )\n>       raise AttributeError(message)\nE       AttributeError: 'Project' object has no attribute 'external_status_checks'\nE       \nE       If you tried to access object attributes returned from the server,\nE       note that <class 'gitlab.v4.objects.projects.Project'> was created as\nE       a `lazy` object and was not initialized with any data.\n\ngitlab/base.py:134: AttributeError\n______________________ test_delete_external_status_checks ______________________\n\ngl = <gitlab.client.Gitlab object at 0x109e53b50>\nresp_delete_external_status_checks = <responses.RequestsMock object at 0x10959c550>\n\n    def test_delete_external_status_checks(gl, resp_delete_external_status_checks):\n>       gl.projects.get(1, lazy=True).external_status_checks.delete(1)\n\ntests/unit/objects/test_status_checks.py:125: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Project id:1>, name = 'external_status_checks'\n\n    def __getattr__(self, name: str) -> Any:\n        if name in self.__dict__[\"_updated_attrs\"]:\n            return self.__dict__[\"_updated_attrs\"][name]\n    \n        if name in self.__dict__[\"_attrs\"]:\n            value = self.__dict__[\"_attrs\"][name]\n            # If the value is a list, we copy it in the _updated_attrs dict\n            # because we are not able to detect changes made on the object\n            # (append, insert, pop, ...). Without forcing the attr\n            # creation __setattr__ is never called, the list never ends up\n            # in the _updated_attrs dict, and the update() and save()\n            # method never push the new data to the server.\n            # See https://github.com/python-gitlab/python-gitlab/issues/306\n            #\n            # note: _parent_attrs will only store simple values (int) so we\n            # don't make this check in the next block.\n            if isinstance(value, list):\n                self.__dict__[\"_updated_attrs\"][name] = value[:]\n                return self.__dict__[\"_updated_attrs\"][name]\n    \n            return value\n    \n        if name in self.__dict__[\"_parent_attrs\"]:\n            return self.__dict__[\"_parent_attrs\"][name]\n    \n        message = f\"{type(self).__name__!r} object has no attribute {name!r}\"\n        if self._created_from_list:\n            message = (\n                f\"{message}\\n\\n\"\n                + textwrap.fill(\n                    f\"{self.__class__!r} was created via a list() call and \"\n                    f\"only a subset of the data may be present. To ensure \"\n                    f\"all data is present get the object using a \"\n                    f\"get(object.id) call. For more details, see:\"\n                )\n                + f\"\\n\\n{_URL_ATTRIBUTE_ERROR}\"\n            )\n        elif self._lazy:\n            message = f\"{message}\\n\\n\" + textwrap.fill(\n                f\"If you tried to access object attributes returned from the server, \"\n                f\"note that {self.__class__!r} was created as a `lazy` object and was \"\n                f\"not initialized with any data.\"\n            )\n>       raise AttributeError(message)\nE       AttributeError: 'Project' object has no attribute 'external_status_checks'\nE       \nE       If you tried to access object attributes returned from the server,\nE       note that <class 'gitlab.v4.objects.projects.Project'> was created as\nE       a `lazy` object and was not initialized with any data.\n\ngitlab/base.py:134: AttributeError\n=========================== short test summary info ============================\nFAILED tests/unit/objects/test_status_checks.py::test_list_external_status_checks\nFAILED tests/unit/objects/test_status_checks.py::test_create_external_status_checks\nFAILED tests/unit/objects/test_status_checks.py::test_delete_external_status_checks\n3 failed, 350 passed, 3 skipped in 0.29s\n",
        "timed_out": false
      }
    ],
    "hidden_apply": {
      "elapsed_seconds": 0.009339583804830909,
      "returncode": 0,
      "stderr": "",
      "stdout": ""
    },
    "original": [
      {
        "command": "python -m pytest -q tests/unit/objects",
        "elapsed_seconds": 0.5773220839910209,
        "returncode": 0,
        "stderr": "",
        "stdout": ".....................................................................s.. [ 20%]\ns....................................................................... [ 40%]\n........................................................................ [ 61%]\n.....s.................................................................. [ 81%]\n.................................................................        [100%]\n350 passed, 3 skipped in 0.40s\n",
        "timed_out": false
      }
    ],
    "reason": null,
    "source_apply": {
      "elapsed_seconds": 0.009896458126604557,
      "returncode": 0,
      "stderr": "",
      "stdout": ""
    },
    "valid": true
  }
}