summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-04-17 14:10:41 -0700
committerJohn L. Villalovos <john@sodarock.com>2021-04-18 07:13:47 -0700
commit630901b30911af01da5543ca609bd27bc5a1a44c (patch)
tree38ae7cfe09cdceca0673834f0c4ff0a9ca6a9813
parent83670a49a3affd2465f8fcbcc3c26141592c1ccd (diff)
downloadgitlab-630901b30911af01da5543ca609bd27bc5a1a44c.tar.gz
chore: fix E711 error reported by flake8
E711: Comparison to none should be 'if cond is none:' https://www.flake8rules.com/rules/E711.html
-rw-r--r--gitlab/tests/test_base.py4
-rw-r--r--gitlab/tests/test_config.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/gitlab/tests/test_base.py b/gitlab/tests/test_base.py
index a0adcb0..2fa4b1a 100644
--- a/gitlab/tests/test_base.py
+++ b/gitlab/tests/test_base.py
@@ -80,7 +80,7 @@ class TestRESTObject:
assert {"foo": "bar"} == obj._attrs
assert {} == obj._updated_attrs
- assert None == obj._create_managers()
+ assert obj._create_managers() is None
assert fake_manager == obj.manager
assert fake_gitlab == obj.manager.gitlab
@@ -112,7 +112,7 @@ class TestRESTObject:
assert 42 == obj.get_id()
obj.id = None
- assert None == obj.get_id()
+ assert obj.get_id() is None
def test_custom_id_attr(self, fake_manager):
class OtherFakeObject(FakeObject):
diff --git a/gitlab/tests/test_config.py b/gitlab/tests/test_config.py
index e428cd1..b456cff 100644
--- a/gitlab/tests/test_config.py
+++ b/gitlab/tests/test_config.py
@@ -154,7 +154,7 @@ def test_valid_data(m_open, path_exists):
assert "one" == cp.gitlab_id
assert "http://one.url" == cp.url
assert "ABCDEF" == cp.private_token
- assert None == cp.oauth_token
+ assert cp.oauth_token is None
assert 2 == cp.timeout
assert cp.ssl_verify is True
assert cp.per_page is None
@@ -166,7 +166,7 @@ def test_valid_data(m_open, path_exists):
assert "two" == cp.gitlab_id
assert "https://two.url" == cp.url
assert "GHIJKL" == cp.private_token
- assert None == cp.oauth_token
+ assert cp.oauth_token is None
assert 10 == cp.timeout
assert cp.ssl_verify is False
@@ -177,7 +177,7 @@ def test_valid_data(m_open, path_exists):
assert "three" == cp.gitlab_id
assert "https://three.url" == cp.url
assert "MNOPQR" == cp.private_token
- assert None == cp.oauth_token
+ assert cp.oauth_token is None
assert 2 == cp.timeout
assert "/path/to/CA/bundle.crt" == cp.ssl_verify
assert 50 == cp.per_page
@@ -188,7 +188,7 @@ def test_valid_data(m_open, path_exists):
cp = config.GitlabConfigParser(gitlab_id="four")
assert "four" == cp.gitlab_id
assert "https://four.url" == cp.url
- assert None == cp.private_token
+ assert cp.private_token is None
assert "STUV" == cp.oauth_token
assert 2 == cp.timeout
assert cp.ssl_verify is True
@@ -227,7 +227,7 @@ def test_data_from_helper(m_open, path_exists, tmp_path):
cp = config.GitlabConfigParser(gitlab_id="helper")
assert "helper" == cp.gitlab_id
assert "https://helper.url" == cp.url
- assert None == cp.private_token
+ assert cp.private_token is None
assert "secret" == cp.oauth_token