mirror of
https://github.com/clearlinux/telemetrics-backend.git
synced 2026-09-05 05:11:56 +00:00
Implementing the service to process crash data for crash view tab. To make code easier to maintain copy shared code from a shared directory instead of having multiple copies of the same code in different source directories. Squash migrations. Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
23 lines
518 B
Python
23 lines
518 B
Python
import unittest
|
|
from process import GuilyBlacklist
|
|
|
|
guilties = [('fa', 'mb'), ('fc', 'md')]
|
|
|
|
|
|
class BlacklistTest(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
self.bl = GuilyBlacklist(guilties)
|
|
|
|
def test_blacklisted_item(self):
|
|
existing = guilties[1]
|
|
self.assertEqual(self.bl.contains(existing), True)
|
|
|
|
def test_non_blacklisted_item(self):
|
|
non_existing = ('fx', 'mx')
|
|
self.assertEqual(self.bl.contains(non_existing), False)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|