Skip to content

Commit

Permalink
minor tweaks to tests, missing assertion statements
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanvg committed Jul 2, 2020
1 parent d50001b commit 3336498
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions medallion/test/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_get_objects(backend):
'marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da',
'malware--c0931cc6-c75e-47e5-9036-78fabc95d4ec',
'indicator--6770298f-0fd8-471a-ab8c-1c658a46574e']
x = 0

for x in range(0, len(correct_order)):
assert objs['objects'][x]['id'] == correct_order[x]

Expand Down Expand Up @@ -241,7 +241,7 @@ def test_get_object_manifests(backend):
assert r.headers['X-TAXII-Date-Added-Last'] == "2017-12-31T13:49:53.935000Z"

# checking ordered by date_added
x = 1

for x in range(1, len(manifests["objects"])):
assert manifests["objects"][x - 1]["date_added"] < manifests["objects"][x]["date_added"]

Expand Down Expand Up @@ -294,9 +294,8 @@ def test_get_objects_limit(backend):
'indicator--cd981c25-8042-4166-8945-51178443bdac',
'marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da']

x = 0
for x in range(0, len(correct_order)):
objs["objects"][x]["id"] == correct_order[x]
assert objs["objects"][x]["id"] == correct_order[x]

r = backend.client.get(
test.GET_OBJECTS_EP + "?limit=3&next=" + r.json["next"],
Expand All @@ -314,9 +313,9 @@ def test_get_objects_limit(backend):

correct_order = ['malware--c0931cc6-c75e-47e5-9036-78fabc95d4ec',
'indicator--6770298f-0fd8-471a-ab8c-1c658a46574e']
x = 0

for x in range(0, len(correct_order)):
objs["objects"][x]["id"] == correct_order[x]
assert objs["objects"][x]["id"] == correct_order[x]


def test_get_objects_id(backend):
Expand Down

0 comments on commit 3336498

Please sign in to comment.