'``_parse_restart_policy`` raises ``ApplicationConfigurationError`` if
the supplied ``restart_policy`` name is not recognised.'

def test_error_on_unknown_restart_policy_name(self):

    expected_restart_policy_name = u'unknown-restart-policy'
    exception = self.assertRaises(ApplicationConfigurationError, _parse_restart_policy, application_name=u'foobar', config={u'name': expected_restart_policy_name})
    self.assertEqual(u"Invalid    'restart_policy'    name    '{}'.    Use    one    of:    always,    never,    on-failure".format(expected_restart_policy_name), exception.message)
