<commit_before>package xmlrpc

import (
	"testing"
)

const faultRespXml = `
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
  <fault>
    <value>
      <struct>
        <member>
          <name>faultString</name>
          <value>
            <string>You must log in before using this part of Bugzilla.</string>
          </value>
        </member>
        <member>
          <name>faultCode</name>
          <value>
            <int>410</int>
          </value>
        </member>
      </struct>
    </value>
  </fault>
</methodResponse>`

func Test_failedResponse(t *testing.T) {
	resp := NewResponse([]byte(faultRespXml))

	if !resp.Failed() {
		t.Fatal("Failed() error: expected true, got false")
	}

	if resp.Err == nil {
		t.Fatal("Err() error: expected error, got nil")<commit_msg>Fix for Test_failedResponse test<commit_after>package xmlrpc

import (
	"testing"
)

const faultRespXml = `
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
  <fault>
    <value>
      <struct>
        <member>
          <name>faultString</name>
          <value>
            <string>You must log in before using this part of Bugzilla.</string>
          </value>
        </member>
        <member>
          <name>faultCode</name>
          <value>
            <int>410</int>
          </value>
        </member>
      </struct>
    </value>
  </fault>
</methodResponse>`

func Test_failedResponse(t *testing.T) {
	resp := NewResponse([]byte(faultRespXml))

	if !resp.Failed() {
		t.Fatal("Failed() error: expected true, got false")
	}

	if resp.Err() == nil {
		t.Fatal("Err() error: expected error, got nil")
{'fraction_non_alphanumeric': 0.15479876160990713, 'fraction_numerical': 0.007430340557275541, 'mean_word_length': 2.2979591836734694, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 2, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3899935', 'n_tokens_mistral': 552, 'n_tokens_neox': 515, 'n_words': 122}