diff options
author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2015-12-31 07:02:12 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2015-12-31 07:02:12 +0100 |
commit | 2a76b7490ba3dc6de6080d2dab55be017c09db59 (patch) | |
tree | 26650bd3b5a07b773d38fe8ada3f7bf9071ce0ca /gitlab/tests | |
parent | a636d5ab25d2b248d89363ac86ecad7a0b90f100 (diff) | |
download | gitlab-2a76b7490ba3dc6de6080d2dab55be017c09db59.tar.gz |
Rename the _created attribute _from_api
Diffstat (limited to 'gitlab/tests')
-rw-r--r-- | gitlab/tests/test_gitlab.py | 4 | ||||
-rw-r--r-- | gitlab/tests/test_gitlabobject.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py index 60cb94e..a0f35bb 100644 --- a/gitlab/tests/test_gitlab.py +++ b/gitlab/tests/test_gitlab.py @@ -337,7 +337,7 @@ class TestGitLabMethods(unittest.TestCase): def test_delete_unknown_path(self): obj = Project(self.gl, data={"name": "testname", "id": 1}) - obj._created = True + obj._from_api = True @urlmatch(scheme="http", netloc="localhost", path="/api/v3/projects/1", method="delete") @@ -398,7 +398,7 @@ class TestGitLabMethods(unittest.TestCase): obj = User(self.gl, data={"email": "email", "password": "password", "username": "username", "name": "name", "can_create_group": True}) - obj._created = True + obj._from_api = True @urlmatch(scheme="http", netloc="localhost", path="/api/v3/projects/1", method="delete") diff --git a/gitlab/tests/test_gitlabobject.py b/gitlab/tests/test_gitlabobject.py index 01e954b..812e6c6 100644 --- a/gitlab/tests/test_gitlabobject.py +++ b/gitlab/tests/test_gitlabobject.py @@ -182,7 +182,7 @@ class TestGitLabObject(unittest.TestCase): def test_get_list_or_object_cant_get(self): with HTTMock(resp_get_issue): - gl_object = Issue(self.gl, data={"name": "name"}) + gl_object = UserProject(self.gl, data={"name": "name"}) self.assertRaises(NotImplementedError, gl_object._get_list_or_object, self.gl, id=1) @@ -245,7 +245,7 @@ class TestGitLabObject(unittest.TestCase): "password": "password", "id": 1, "username": "username"}) self.assertEqual(obj.name, "testname") - obj._created = True + obj._from_api = True obj.name = "newname" with HTTMock(resp_update_user): obj.save() @@ -259,7 +259,7 @@ class TestGitLabObject(unittest.TestCase): def test_delete(self): obj = Group(self.gl, data={"name": "testname", "id": 1}) - obj._created = True + obj._from_api = True with HTTMock(resp_delete_group): data = obj.delete() self.assertIs(data, True) |