Total Complexity | 3 |
Total Lines | 22 |
Duplicated Lines | 0 % |
1 | # -*- coding: utf-8 -*- |
||
10 | class ElementTests(unittest.TestCase): |
||
11 | |||
12 | def testAction(self): |
||
13 | from crabpy.wsa import Action |
||
14 | a = Action('http://soap.test.org/test') |
||
15 | act = Element('Action', ns=wsa) |
||
16 | act.setText('http://soap.test.org/test') |
||
17 | self.assertEqual(act, a.xml()) |
||
18 | |||
19 | def testTo(self): |
||
20 | from crabpy.wsa import To |
||
21 | t = To('http://ws.agiv.be/capakeyws/nodataset.asmx') |
||
22 | to = Element('To', ns=wsa) |
||
23 | to.setText('http://ws.agiv.be/capakeyws/nodataset.asmx') |
||
24 | self.assertEqual(to, t.xml()) |
||
25 | |||
26 | def testMessageId(self): |
||
27 | from crabpy.wsa import MessageID |
||
28 | mid = MessageID() |
||
29 | # Test that we have the correct element. Ignores content. |
||
30 | messageid = Element('MessageID', ns=wsa) |
||
31 | self.assertEqual(messageid, mid.xml()) |
||
32 |