@mock.patch('certbot._internal.cert_manager.domains_for_certname')
def test_grab_domains(self, mock_domains):
    mock_config = mock.Mock(domains=None, certname='one.com')
    mock_domains.return_value = ['one.com', 'two.com']
    self.assertEqual(main._find_domains_or_certname(mock_config, None), (['one.com', 'two.com'], 'one.com'))
@mock.patch('certbot._internal.cert_manager.domains_for_certname')
def test_grab_domains(self, mock_domains):
    mock_config = mock.Mock(domains=None, certname='one.com')
    mock_domains.return_value = ['one.com', 'two.com']
    self.assertEqual(main._find_domains_or_certname(mock_config, None), (['one.com', 'two.com'], 'one.com'))