summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMickael Remond <mremond@process-one.net>2016-02-03 19:22:59 +0100
committerMickael Remond <mremond@process-one.net>2016-02-03 19:22:59 +0100
commit89dda473cfc19659205bfbbb64e034fb2307876c (patch)
tree70640fdedd6bf0b6304d654924732d43419418af /test
parentSwitch to Fast XML module (diff)
Convert tests to Fast XML
Diffstat (limited to 'test')
-rw-r--r--test/suite.erl12
-rw-r--r--test/suite.hrl2
2 files changed, 7 insertions, 7 deletions
diff --git a/test/suite.erl b/test/suite.erl
index 74d9b062..e04b9d98 100644
--- a/test/suite.erl
+++ b/test/suite.erl
@@ -94,8 +94,8 @@ init_stream(Config) ->
ok = send_text(Config, io_lib:format(?STREAM_HEADER,
[?config(server, Config)])),
{xmlstreamstart, <<"stream:stream">>, Attrs} = recv(),
- <<"jabber:client">> = xml:get_attr_s(<<"xmlns">>, Attrs),
- <<"1.0">> = xml:get_attr_s(<<"version">>, Attrs),
+ <<"jabber:client">> = fxml:get_attr_s(<<"xmlns">>, Attrs),
+ <<"1.0">> = fxml:get_attr_s(<<"version">>, Attrs),
#stream_features{sub_els = Fs} = recv(),
Mechs = lists:flatmap(
fun(#sasl_mechanisms{list = Ms}) ->
@@ -182,8 +182,8 @@ wait_auth_SASL_result(Config) ->
io_lib:format(?STREAM_HEADER,
[?config(server, Config)])),
{xmlstreamstart, <<"stream:stream">>, Attrs} = recv(),
- <<"jabber:client">> = xml:get_attr_s(<<"xmlns">>, Attrs),
- <<"1.0">> = xml:get_attr_s(<<"version">>, Attrs),
+ <<"jabber:client">> = fxml:get_attr_s(<<"xmlns">>, Attrs),
+ <<"1.0">> = fxml:get_attr_s(<<"version">>, Attrs),
#stream_features{sub_els = Fs} = recv(),
lists:foldl(
fun(#feature_sm{}, ConfigAcc) ->
@@ -255,7 +255,7 @@ send(State, Pkt) ->
end,
El = xmpp_codec:encode(NewPkt),
ct:pal("sent: ~p <-~n~s", [El, xmpp_codec:pp(NewPkt)]),
- ok = send_text(State, xml:element_to_binary(El)),
+ ok = send_text(State, fxml:element_to_binary(El)),
NewID.
send_recv(State, IQ) ->
@@ -271,7 +271,7 @@ sasl_new(<<"DIGEST-MD5">>, User, Server, Password) ->
case cyrsasl_digest:parse(ServerIn) of
bad -> {error, <<"Invalid SASL challenge">>};
KeyVals ->
- Nonce = xml:get_attr_s(<<"nonce">>, KeyVals),
+ Nonce = fxml:get_attr_s(<<"nonce">>, KeyVals),
CNonce = id(),
Realm = proplists:get_value(<<"realm">>, KeyVals, Server),
DigestURI = <<"xmpp/", Realm/binary>>,
diff --git a/test/suite.hrl b/test/suite.hrl
index 5463575a..5638fdb7 100644
--- a/test/suite.hrl
+++ b/test/suite.hrl
@@ -1,5 +1,5 @@
-include_lib("common_test/include/ct.hrl").
--include_lib("p1_xml/include/xml.hrl").
+-include_lib("fast_xml/include/fxml.hrl").
-include("ns.hrl").
-include("ejabberd.hrl").
-include("mod_proxy65.hrl").