Esempio n. 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)
Esempio n. 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)
Esempio n. 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)