'``_parse_restart_policy`` raises ``ApplicationConfigurationError`` if
extra keys are specified for a retry policy.'

def test_error_on_restart_policy_with_extra_keys(self):

    exception = self.assertRaises(ApplicationConfigurationError, _parse_restart_policy, application_name=u'foobar', config=dict(name=u'on-failure', extra=u'key'))
    self.assertEqual(u"Invalid    'restart_policy'    arguments    for    RestartOnFailure.    Got    {'extra':    u'key'}", exception.message)
