Skip to content

Commit

Permalink
Blackened
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Collins committed Apr 14, 2020
1 parent 5c05be4 commit 01e54c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
20 changes: 5 additions & 15 deletions tests/test_core_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,12 @@ def test_get_summary(example_class):

def test_rupdate_granular():
# Update string value
s1 = {
"a": "String",
}
s2 = {
"a": "String 2",
}
s1 = {"a": "String"}
s2 = {"a": "String 2"}
assert utilities.rupdate(s1, s2) == s2

# Update int value
i1 = {
"b": 5,
}
i1 = {"b": 5}
i2 = {"b": 50}
assert utilities.rupdate(i1, i2) == i2

Expand All @@ -76,9 +70,7 @@ def test_rupdate_granular():

# Merge dictionaries
d1 = {"d": {"a": "String", "b": 5, "c": []}}
d2 = {
"d": {"a": "String 2", "b": 50, "c": [1, 2, 3, 4, 5]},
}
d2 = {"d": {"a": "String 2", "b": 50, "c": [1, 2, 3, 4, 5]}}
assert utilities.rupdate(d1, d2) == d2

# Replace value with list
Expand All @@ -98,9 +90,7 @@ def test_rupdate_granular():

# Create missing dictionary
md1 = {}
md2 = {
"d": {"a": "String 2", "b": 50, "c": [1, 2, 3, 4, 5]},
}
md2 = {"d": {"a": "String 2", "b": 50, "c": [1, 2, 3, 4, 5]}}
assert utilities.rupdate(md1, md2) == md2


Expand Down
4 changes: 1 addition & 3 deletions tests/test_server_spec_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ def test_expand_refs_no_refs(spec):


def test_expand_refs_missing_schema(spec):
input_dict = {
"$ref": "MissingRef",
}
input_dict = {"$ref": "MissingRef"}

assert utilities.expand_refs(input_dict, spec) == input_dict
7 changes: 1 addition & 6 deletions tests/test_server_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,7 @@ def test_func(
}
)()

data = {
"positional": 10,
"n": 50,
"optlist": [4, 5, 6],
"untyped": True,
}
data = {"positional": 10, "n": 50, "optlist": [4, 5, 6], "untyped": True}
assert gen_schema.dump(data) == expected_schema.dump(data)


Expand Down

0 comments on commit 01e54c5

Please sign in to comment.