summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Clauss <cclauss@me.com>2019-10-19 22:36:32 +0200
committerGitHub <noreply@github.com>2019-10-19 22:36:32 +0200
commitf54cd86b653e222d0aad2075a7265e5cfd840be4 (patch)
tree31aba29553dc06fa6b0a5d35d1692b476bdc84bc /tests
parentc1a147e8e6c196c3c80baf53c54e1a9a3ddf65c9 (diff)
downloadonionshare-f54cd86b653e222d0aad2075a7265e5cfd840be4.tar.gz
onionshare-f54cd86b653e222d0aad2075a7265e5cfd840be4.zip
Use ==/!= to compare str, bytes, and int literals
https://docs.python.org/3/whatsnew/3.8.html#changes-in-python-behavior The compiler now produces a SyntaxWarning when identity checks (is and is not) are used with certain types of literals (e.g. strings, numbers). These can often work by accident in CPython, but are not guaranteed by the language spec. The warning advises users to use equality tests (== and !=) instead.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_onionshare_web.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_onionshare_web.py b/tests/test_onionshare_web.py
index b971b31a..43a8929b 100644
--- a/tests/test_onionshare_web.py
+++ b/tests/test_onionshare_web.py
@@ -71,7 +71,7 @@ def web_obj(common_obj, mode, num_files=0):
class TestWeb:
def test_share_mode(self, common_obj):
web = web_obj(common_obj, "share", 3)
- assert web.mode is "share"
+ assert web.mode == "share"
with web.app.test_client() as c:
# Load / without auth
res = c.get("/")
@@ -127,7 +127,7 @@ class TestWeb:
def test_receive_mode(self, common_obj):
web = web_obj(common_obj, "receive")
- assert web.mode is "receive"
+ assert web.mode == "receive"
with web.app.test_client() as c:
# Load / without auth