(1 . 4)(1 . 5)
381 # https://stackoverflow.com/questions/1896918/running-unittest-with-typical-test-directory-structure
382 import time
383 import unittest
384 import logging
385 from mock import Mock
(75 . 6)(76 . 16)
387 def tearDown(self):
388 pass
389
390 def test_clean_getdata_requests_clears_expired_hashes(self):
391 self.station.getdata_requests["abc"] = time.time() - 15
392 self.station.clean_getdata_requests()
393 self.assertEqual(len(self.station.getdata_requests), 0)
394
395 def test_clean_getdata_requests_retains_valid_hashes(self):
396 self.station.getdata_requests["abc"] = time.time()
397 self.station.clean_getdata_requests()
398 self.assertEqual(len(self.station.getdata_requests), 1)
399
400 def test_embargo_bounce_ordering(self):
401 self.skipTest("the tested code has been re-implemented")
402 peer1 = Mock()