"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "panko/tests/functional/storage/test_storage_scenarios.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_storage_scenarios.py  (panko-8.0.0):test_storage_scenarios.py  (panko-8.1.0)
skipping to change at line 69 skipping to change at line 69
self.end = now self.end = now
self.conn.record_events(self.models) self.conn.record_events(self.models)
@tests_db.run_with('sqlite', 'mysql', 'pgsql') @tests_db.run_with('sqlite', 'mysql', 'pgsql')
class EventTTLTest(EventTestBase): class EventTTLTest(EventTestBase):
@mock.patch.object(timeutils, 'utcnow') @mock.patch.object(timeutils, 'utcnow')
def test_clear_expired_data(self, mock_utcnow): def test_clear_expired_data(self, mock_utcnow):
mock_utcnow.return_value = datetime.datetime(2013, 12, 31, 10, 0) mock_utcnow.return_value = datetime.datetime(2013, 12, 31, 10, 0)
self.conn.clear_expired_data(3600) self.conn.clear_expired_data(3600, 100)
events = list(self.conn.get_events(storage.EventFilter())) events = list(self.conn.get_events(storage.EventFilter()))
self.assertEqual(2, len(events)) self.assertEqual(2, len(events))
event_types = list(self.conn.get_event_types()) event_types = list(self.conn.get_event_types())
self.assertEqual(['Bar', 'Zoo'], event_types) self.assertEqual(['Bar', 'Zoo'], event_types)
for event_type in event_types: for event_type in event_types:
trait_types = list(self.conn.get_trait_types(event_type)) trait_types = list(self.conn.get_trait_types(event_type))
self.assertEqual(4, len(trait_types)) self.assertEqual(4, len(trait_types))
traits = list(self.conn.get_traits(event_type)) traits = list(self.conn.get_traits(event_type))
self.assertEqual(4, len(traits)) self.assertEqual(4, len(traits))
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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