File: regtest.rd

package info (click to toggle)
gavodachs 2.11%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,972 kB
  • sloc: python: 100,078; xml: 3,014; javascript: 2,360; ansic: 918; sh: 216; makefile: 31
file content (72 lines) | stat: -rw-r--r-- 1,752 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<resource schema="test" readProfiles="trustedquery,untrustedquery">
	<execute id="silly" title="Do silly things" at="m1 1:00">
		<job>
			<code>
				print("Silly")
			</code>
		</job>
	</execute>

	<regSuite id="dumbsuite">
		<regTest title="Failing Test" id="failtest">
			<url testParam="10%w/o tax">foo</url>
			<code>
				self.assertHasStrings("Wittgenstein")
			</code>
		</regTest>
		<regTest title="Succeeding Test">
			<code>
				assert True
			</code>
		</regTest>
		<regTest title="failing XSD Test" id="xsdfail">
			<url testParam="10%w/o tax">foo</url>
			<code>
				self.assertValidatesXSD()
			</code>
		</regTest>
		<regTest id="xpathfail" title="not lots" url="/bar">
			<code>
				self.assertXpath("//v2:RESOURCE[1]", {
					"type": "lots"})
			</code>
		</regTest>
		<regTest id="exclusive" title="tagged test" url="/bar"
			tags="elite,prolete">
			<code>
				assert False, "You run a tagged test"
			</code>
		</regTest>
	</regSuite>
	
	<regSuite title="URL tests" id="urltests">
		<regTest title="a" id="atest">
			<url testParam="10%w/o tax">foo</url>
			<code>
				self.assertHasStrings("Kant", "Hume")
			</code>
		</regTest>
		<regTest title="b" url="/bar">
			<code>
				self.assertValidatesXSD()
			</code>
		</regTest>
		<regTest title="c"><url httpMethod="POST">
			<gobba>&amp;?</gobba>ivo://ivoa.net/std/quack</url>
			<code>
				self.assertHTTPStatus(200)
			</code>
		</regTest>
		<regTest title="d"><url>nork?urk=zoo<oo>1</oo><oo>2</oo></url>
		</regTest>
		<regTest title="xpathsuccess" url="/bar">
			<code>
				self.assertXpath("//v2:RESOURCE[1]", {
					"type": "meta", None: None})
				self.assertXpath("//v2:RESOURCE/v2:DESCRIPTION", {
					None: "give exact"})
			</code>
		</regTest>
	</regSuite>
</resource>