Exemple #1
0
 def test_that_when_creating_a_domain_fails_the_create_domain_method_returns_error(self):
     '''
     tests False domain not created.
     '''
     self.conn.create_elasticsearch_domain.side_effect = ClientError(error_content, 'create_domain')
     args = copy.copy(domain_ret)
     args.update(conn_parameters)
     result = boto_elasticsearch_domain.create(**args)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('create_domain'))
 def test_that_when_creating_a_domain_fails_the_create_domain_method_returns_error(self):
     '''
     tests False domain not created.
     '''
     self.conn.create_elasticsearch_domain.side_effect = ClientError(error_content, 'create_domain')
     args = copy.copy(domain_ret)
     args.update(conn_parameters)
     result = boto_elasticsearch_domain.create(**args)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('create_domain'))
Exemple #3
0
    def test_that_when_creating_a_domain_succeeds_the_create_domain_method_returns_true(self):
        '''
        tests True domain created.
        '''
        self.conn.create_elasticsearch_domain.return_value = {'DomainStatus': domain_ret}
        args = copy.copy(domain_ret)
        args.update(conn_parameters)
        result = boto_elasticsearch_domain.create(**args)

        self.assertTrue(result['created'])
    def test_that_when_creating_a_domain_succeeds_the_create_domain_method_returns_true(self):
        '''
        tests True domain created.
        '''
        self.conn.create_elasticsearch_domain.return_value = {'DomainStatus': domain_ret}
        args = copy.copy(domain_ret)
        args.update(conn_parameters)
        result = boto_elasticsearch_domain.create(**args)

        self.assertTrue(result['created'])
 def test_that_when_creating_a_domain_fails_the_create_domain_method_returns_error(
     self, ):
     """
     tests False domain not created.
     """
     self.conn.create_elasticsearch_domain.side_effect = ClientError(
         error_content, "create_domain")
     args = copy.copy(domain_ret)
     args.update(conn_parameters)
     result = boto_elasticsearch_domain.create(**args)
     assert result.get(
         "error",
         {}).get("message") == error_message.format("create_domain")
    def test_that_when_creating_a_domain_succeeds_the_create_domain_method_returns_true(
        self, ):
        """
        tests True domain created.
        """
        self.conn.create_elasticsearch_domain.return_value = {
            "DomainStatus": domain_ret
        }
        args = copy.copy(domain_ret)
        args.update(conn_parameters)
        result = boto_elasticsearch_domain.create(**args)

        assert result["created"]