Example #1
0
 def test_attributes_with_spec(self, mock_warning):
     """Verify all other `Item` attributes raise an exception."""
     spec = Item(None, os.path.join(FILES, 'REQ001.yml'))
     self.item = UnknownItem(self.item.uid, spec=spec)
     self.assertRaises(AttributeError, getattr, self.item, 'path')
     self.assertRaises(AttributeError, getattr, self.item, 'text')
     self.assertRaises(AttributeError, getattr, self.item, 'delete')
     self.assertRaises(AttributeError, getattr, self.item, 'not_on_item')
     self.assertEqual(3, mock_warning.call_count)
Example #2
0
 def setUp(self):
     self.item = UnknownItem('RQ001')
Example #3
0
 def test_le(self):
     """Verify unknown item's UID less operator."""
     self.assertTrue(self.item < UnknownItem('RQ002'))
     self.assertFalse(self.item < self.item)