-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
basic test for ECNQueue.getValidQueues()
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#Importing pytest is not required unless using markers, as demonstrated below | ||
import pytest | ||
import ECNQueue | ||
|
||
@pytest.mark.getValidQueuesTest | ||
def test_item(): | ||
queueCounts = ECNQueue.getQueueCounts() | ||
|
||
# Ensure that getQueueCounts() within ECNQueue returns a list | ||
assert type(queueCounts) is list | ||
|
||
# Ensure that getQueueCounts() within ECNQueue returns a list of dictionaries with this syntax: | ||
|
||
# {'name': '_string' | ||
# 'number_of_items': _int} | ||
for queue in queueCounts: | ||
assert type(queue) is dict | ||
assert "name" in queue.keys() | ||
assert type(queue['name']) is str | ||
assert "number_of_items" in queue.keys() | ||
assert type(queue['number_of_items']) is int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from distutils.core import setup | ||
|
||
setup(name='ApiECNQueue', | ||
py_modules=['api', 'ECNQueue',], | ||
) |