| |
@@ -1,6 +1,5 @@
|
| |
import copy
|
| |
import unittest
|
| |
- from nose.tools import eq_
|
| |
|
| |
import kojihub
|
| |
|
| |
@@ -16,7 +15,7 @@
|
| |
opts = None
|
| |
expected = copy.copy(self.original)
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
|
| |
def test_order_by_foo(self):
|
| |
opts = {'order': 'foo'}
|
| |
@@ -26,7 +25,7 @@
|
| |
{'foo': 2, 'bar': -1},
|
| |
]
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
|
| |
def test_order_by_bar(self):
|
| |
opts = {'order': 'bar'}
|
| |
@@ -36,7 +35,7 @@
|
| |
{'foo': 1, 'bar': 1},
|
| |
]
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
|
| |
def test_order_in_reverse(self):
|
| |
opts = {'order': '-foo'}
|
| |
@@ -46,7 +45,7 @@
|
| |
{'foo': 0, 'bar': 0},
|
| |
]
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
|
| |
def test_offset(self):
|
| |
opts = {'offset': 1}
|
| |
@@ -55,7 +54,7 @@
|
| |
{'foo': 0, 'bar': 0},
|
| |
]
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
|
| |
def test_limit(self):
|
| |
opts = {'limit': 2}
|
| |
@@ -64,7 +63,7 @@
|
| |
{'foo': 2, 'bar': -1},
|
| |
]
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
|
| |
def test_limit_and_offset(self):
|
| |
opts = {'limit': 1, 'offset': 1}
|
| |
@@ -72,15 +71,15 @@
|
| |
{'foo': 2, 'bar': -1},
|
| |
]
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
|
| |
def test_count_only(self):
|
| |
opts = {'countOnly': True}
|
| |
expected = 3
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
|
| |
opts = {'countOnly': True, 'offset': 2}
|
| |
expected = 1
|
| |
actual = kojihub._applyQueryOpts(self.original, opts)
|
| |
- eq_(expected, actual)
|
| |
+ assert expected == actual
|
| |
Nose upstream is abandoned. Switch to run the tests with pytest.