'If a rule has a hostname, it is used unchanged and the common prefix is
not included in the replacement.'

@given(hostname=text(), other_hostname=text(), replace=sampled_from(['replace_key', 'replace_key_prefix']))
def test_given_hostname(self, hostname, replace, other_hostname):

    rules = parse_routing_rules({'prefix/': {'key/': {replace: 'replacement', 'hostname': other_hostname}}}, hostname)
    self.assertThat(rules, MatchesRoutingRules([RoutingRule.when(key_prefix='prefix/key/').then_redirect(hostname=other_hostname, protocol='https', http_redirect_code=302, **{replace: 'replacement'})]))
