def test_that_when_listing_topic_rules_fails_the_list_topic_rules_method_returns_error(self): ''' tests False policy error. ''' self.conn.list_topic_rules.side_effect = ClientError(error_content, 'list_topic_rules') result = boto_iot.list_topic_rules(**conn_parameters) self.assertEqual(result.get('error', {}).get('message'), error_message.format('list_topic_rules'))
def test_that_when_listing_topic_rules_fails_the_list_topic_rules_method_returns_error(self): ''' tests False policy error. ''' self.conn.list_topic_rules.side_effect = ClientError(error_content, 'list_topic_rules') result = boto_iot.list_topic_rules(**conn_parameters) self.assertEqual(result.get('error', {}).get('message'), error_message.format('list_topic_rules'))
def test_that_when_listing_topic_rules_succeeds_the_list_topic_rules_method_returns_true(self): ''' tests True topic_rules listed. ''' self.conn.list_topic_rules.return_value = {'rules': [topic_rule_ret]} result = boto_iot.list_topic_rules(**conn_parameters) self.assertTrue(result['rules'])
def test_that_when_listing_topic_rules_succeeds_the_list_topic_rules_method_returns_true(self): ''' tests True topic_rules listed. ''' self.conn.list_topic_rules.return_value = {'rules': [topic_rule_ret]} result = boto_iot.list_topic_rules(**conn_parameters) self.assertTrue(result['rules'])
def test_that_when_listing_topic_rules_fails_the_list_topic_rules_method_returns_error( self, ): """ tests False policy error. """ self.conn.list_topic_rules.side_effect = ClientError(error_content, "list_topic_rules") result = boto_iot.list_topic_rules(**conn_parameters) assert result.get("error", {}).get("message") == error_message.format("list_topic_rules")
def test_that_when_listing_topic_rules_succeeds_the_list_topic_rules_method_returns_true( self, ): """ tests True topic_rules listed. """ self.conn.list_topic_rules.return_value = {"rules": [topic_rule_ret]} result = boto_iot.list_topic_rules(**conn_parameters) self.assertTrue(result["rules"])
def test_that_when_listing_topic_rules_succeeds_the_list_topic_rules_method_returns_true( boto_conn): ''' tests True topic_rules listed. ''' boto_conn.list_topic_rules.return_value = {'rules': [topic_rule_ret]} result = boto_iot.list_topic_rules(**pytest.conn_parameters) assert result['rules']
def test_that_when_listing_topic_rules_fails_the_list_topic_rules_method_returns_error( boto_conn): ''' tests False policy error. ''' boto_conn.list_topic_rules.side_effect = exceptions.ClientError( error_content, 'list_topic_rules') result = boto_iot.list_topic_rules(**pytest.conn_parameters) assert result.get( 'error', {}).get('message') == error_message.format('list_topic_rules')