Skip to content

Commit 06dcd1f

Browse files
author
Joel Collins
committed
Removed unnecessary literals
1 parent da49cfd commit 06dcd1f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/test_server_decorators.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def func():
121121

122122
def test_thing_action(empty_cls):
123123
wrapped_cls = decorators.thing_action(empty_cls)
124-
assert wrapped_cls.__apispec__["tags"] == set(["actions"])
124+
assert wrapped_cls.__apispec__["tags"] == {"actions"}
125125

126126

127127
def test_safe(empty_cls):
@@ -136,12 +136,12 @@ def test_idempotent(empty_cls):
136136

137137
def test_thing_property(view_cls):
138138
wrapped_cls = decorators.thing_property(view_cls)
139-
assert wrapped_cls.__apispec__["tags"] == set(["properties"])
139+
assert wrapped_cls.__apispec__["tags"] == {"properties"}
140140

141141

142142
def test_thing_property_empty_class(empty_cls, app_ctx):
143143
wrapped_cls = decorators.thing_property(empty_cls)
144-
assert wrapped_cls.__apispec__["tags"] == set(["properties"])
144+
assert wrapped_cls.__apispec__["tags"] == {"properties"}
145145

146146

147147
def test_thing_property_property_notify(view_cls, app_ctx):
@@ -307,12 +307,12 @@ def test_doc(empty_cls):
307307

308308
def test_tag(empty_cls):
309309
wrapped_cls = decorators.tag(["tag", "tag2"])(empty_cls)
310-
assert wrapped_cls.__apispec__["tags"] == set(["tag", "tag2"])
310+
assert wrapped_cls.__apispec__["tags"] == {"tag", "tag2"}
311311

312312

313313
def test_tag_single(empty_cls):
314314
wrapped_cls = decorators.tag("tag")(empty_cls)
315-
assert wrapped_cls.__apispec__["tags"] == set(["tag"])
315+
assert wrapped_cls.__apispec__["tags"] == {"tag"}
316316

317317

318318
def test_tag_invalid(empty_cls):

tests/test_server_labthing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ def get(self):
6161

6262

6363
def test_add_view_action(thing, view_cls, client):
64-
view_cls.__apispec__ = {"tags": set(["actions"])}
64+
view_cls.__apispec__ = {"tags": {"actions",}}
6565
thing.add_view(view_cls, "/index", endpoint="index")
6666
assert view_cls in thing._action_views.values()
6767

6868

6969
def test_add_view_property(thing, view_cls, client):
70-
view_cls.__apispec__ = {"tags": set(["properties"])}
70+
view_cls.__apispec__ = {"tags": {"properties",}}
7171
thing.add_view(view_cls, "/index", endpoint="index")
7272
assert view_cls in thing._property_views.values()
7373

0 commit comments

Comments
 (0)