"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "panko/tests/functional/storage/test_impl_mongodb.py" between
panko-8.0.0.tar.gz and panko-8.1.0.tar.gz

About: OpenStack Panko is an event storage service and REST API for Ceilometer.
The "Ussuri" series (maintained release).

test_impl_mongodb.py  (panko-8.0.0):test_impl_mongodb.py  (panko-8.1.0)
skipping to change at line 33 skipping to change at line 33
from panko.storage import impl_mongodb from panko.storage import impl_mongodb
from panko.tests import base as test_base from panko.tests import base as test_base
from panko.tests import db as tests_db from panko.tests import db as tests_db
@tests_db.run_with('mongodb') @tests_db.run_with('mongodb')
class IndexTest(tests_db.TestBase): class IndexTest(tests_db.TestBase):
def test_event_ttl_index_absent(self): def test_event_ttl_index_absent(self):
# create a fake index and check it is deleted # create a fake index and check it is deleted
self.conn.clear_expired_data(-1) self.conn.clear_expired_data(-1, 0)
self.assertNotIn("event_ttl", self.assertNotIn("event_ttl",
self.conn.db.event.index_information()) self.conn.db.event.index_information())
self.conn.clear_expired_data(456789) self.conn.clear_expired_data(456789, 0)
self.assertEqual(456789, self.assertEqual(456789,
self.conn.db.event.index_information() self.conn.db.event.index_information()
["event_ttl"]['expireAfterSeconds']) ["event_ttl"]['expireAfterSeconds'])
def test_event_ttl_index_present(self): def test_event_ttl_index_present(self):
self.conn.clear_expired_data(456789) self.conn.clear_expired_data(456789, 0)
self.assertEqual(456789, self.assertEqual(456789,
self.conn.db.event.index_information() self.conn.db.event.index_information()
["event_ttl"]['expireAfterSeconds']) ["event_ttl"]['expireAfterSeconds'])
self.conn.clear_expired_data(-1) self.conn.clear_expired_data(-1, 0)
self.assertNotIn("event_ttl", self.assertNotIn("event_ttl",
self.conn.db.event.index_information()) self.conn.db.event.index_information())
class CapabilitiesTest(test_base.BaseTestCase): class CapabilitiesTest(test_base.BaseTestCase):
# Check the returned capabilities list, which is specific to each DB # Check the returned capabilities list, which is specific to each DB
# driver # driver
def test_capabilities(self): def test_capabilities(self):
expected_capabilities = { expected_capabilities = {
'events': {'query': {'simple': True}}, 'events': {'query': {'simple': True}},
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)