예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)