def test_split_domainname_weird(self):
    self.mock_client.api_version = '1.22'
    service = Service('foo', hostname='name.sub', domainname='domain.tld', image='foo', client=self.mock_client)
    opts = service._get_container_create_options({'image': 'foo'}, 1)
    assert (opts['hostname'] == 'name.sub'), 'hostname'
    assert (opts['domainname'] == 'domain.tld'), 'domainname'
def test_split_domainname_weird(self):
    self.mock_client.api_version = '1.22'
    service = Service('foo', hostname='name.sub', domainname='domain.tld', image='foo', client=self.mock_client)
    opts = service._get_container_create_options({'image': 'foo'}, 1)
    assert (opts['hostname'] == 'name.sub'), 'hostname'
    assert (opts['domainname'] == 'domain.tld'), 'domainname'