def test_given_app_name(self): args = mock.Mock(app_name='myapp', urgency=None) submitter._normalize_args(args) self.assertEqual('myapp', args.app_name) self.assertEqual(None, args.urgency)
def test_given_urgency(self): args = mock.Mock(app_name=None, urgency='LoW') submitter._normalize_args(args) self.assertEqual('submitter', args.app_name) self.assertEqual(protocol.URGENCY_LOW, args.urgency)
def test_defaults(self): args = mock.Mock(app_name=None, urgency=None) submitter._normalize_args(args) self.assertEqual('submitter', args.app_name) self.assertEqual(None, args.urgency)