Advertisement
SVXX

TestUpsService

Sep 30th, 2014
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. def test_0001_ups_readonly(self):
  2.     """
  3.    Test that ups_service is readonly.
  4.    """
  5.     with Transaction().start(DB_NAME, USER, context=CONTEXT):
  6.         self.setup_defaults()
  7.        
  8.         for argument in [
  9.                 {'name': 'None'},
  10.                 {'code': '1234'}
  11.         ]:
  12.             self.assertRaises(
  13.                 UserError, self.ups_service.write,
  14.                 [self.ups_service], argument
  15.             )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement