File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,18 @@ def test_child_node(self):
51
51
self .strip (r ),
52
52
'<?xml version="1.0" encoding="UTF-8"?><Response><message tag="global"><bold>Hello</bold></message></Response>' )
53
53
54
+ def test_mixed (self ):
55
+ r = MessagingResponse ()
56
+
57
+ r .append ('before' )
58
+ r .add_child ('Child' ).append ('content' )
59
+ r .append ('after' )
60
+
61
+ assert_equal (
62
+ self .strip (r ),
63
+ '<?xml version="1.0" encoding="UTF-8"?><Response>before<Child>content</Child>after</Response>'
64
+ )
65
+
54
66
55
67
class TestMessage (TwilioTest ):
56
68
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ def xml(self):
111
111
112
112
for verb in self .verbs :
113
113
if isinstance (verb , str ):
114
- if last_child :
114
+ if last_child is not None :
115
115
last_child .tail = verb
116
116
else :
117
117
el .text = verb
You can’t perform that action at this time.
0 commit comments