Files
Alex Jaramillo 742c7dca3d Crash processing service
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>
2020-03-03 09:57:46 -08:00

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()