@@ -22,20 +22,20 @@ def test_flat(self):
22
22
--===============1946781859==
23
23
Content-Type: application/json
24
24
Content-ID: bar
25
- ETag: 2235038212
25
+ ETag: "1-4229094393"
26
26
27
27
{
28
- "_id": "bar",
29
- "_rev": "2235038212 "
28
+ "_id": "bar",
29
+ "_rev": "1-4229094393 "
30
30
}
31
31
--===============1946781859==
32
32
Content-Type: application/json
33
33
Content-ID: foo
34
- ETag: 2779219239
34
+ ETag: "1-2182689334"
35
35
36
36
{
37
- "_id": "foo",
38
- "_rev": "2779219239",
37
+ "_id": "foo",
38
+ "_rev": "1-2182689334",
39
39
"something": "cool"
40
40
}
41
41
--===============1946781859==--
@@ -47,14 +47,14 @@ def test_flat(self):
47
47
self .assertEqual ('application/json' , headers ['content-type' ])
48
48
if num == 0 :
49
49
self .assertEqual ('bar' , headers ['content-id' ])
50
- self .assertEqual ('2235038212 ' , headers ['etag' ])
51
- self .assertEqual ('{\n "_id": "bar", \n '
52
- '"_rev": "2235038212 "\n }' , payload )
50
+ self .assertEqual ('"1-4229094393" ' , headers ['etag' ])
51
+ self .assertEqual ('{\n "_id": "bar",\n '
52
+ '"_rev": "1-4229094393 "\n }' , payload )
53
53
elif num == 1 :
54
54
self .assertEqual ('foo' , headers ['content-id' ])
55
- self .assertEqual ('2779219239 ' , headers ['etag' ])
56
- self .assertEqual ('{\n "_id": "foo", \n "_rev": "2779219239 ",'
57
- ' \n "something": "cool"\n }' , payload )
55
+ self .assertEqual ('"1-2182689334" ' , headers ['etag' ])
56
+ self .assertEqual ('{\n "_id": "foo",\n "_rev": "1-2182689334 ",'
57
+ '\n "something": "cool"\n }' , payload )
58
58
num += 1
59
59
self .assertEqual (num , 2 )
60
60
@@ -65,23 +65,23 @@ def test_nested(self):
65
65
--===============1946781859==
66
66
Content-Type: application/json
67
67
Content-ID: bar
68
- ETag: 2235038212
68
+ ETag: "1-4229094393"
69
69
70
70
{
71
71
"_id": "bar",
72
- "_rev": "2235038212 "
72
+ "_rev": "1-4229094393 "
73
73
}
74
74
--===============1946781859==
75
75
Content-Type: multipart/mixed; boundary="===============0909101126=="
76
76
Content-ID: foo
77
- ETag: 2779219239
77
+ ETag: "1-919589747"
78
78
79
79
--===============0909101126==
80
80
Content-Type: application/json
81
81
82
82
{
83
83
"_id": "foo",
84
- "_rev": "2779219239 ",
84
+ "_rev": "1-919589747 ",
85
85
"something": "cool"
86
86
}
87
87
--===============0909101126==
@@ -93,6 +93,15 @@ def test_nested(self):
93
93
94
94
Regards, Chris
95
95
--===============0909101126==--
96
+ --===============1946781859==
97
+ Content-Type: application/json
98
+ Content-ID: baz
99
+ ETag: "1-3482142493"
100
+
101
+ {
102
+ "_id": "baz",
103
+ "_rev": "1-3482142493"
104
+ }
96
105
--===============1946781859==--
97
106
'''
98
107
num = 0
@@ -102,13 +111,13 @@ def test_nested(self):
102
111
self .assertEqual (is_multipart , False )
103
112
self .assertEqual ('application/json' , headers ['content-type' ])
104
113
self .assertEqual ('bar' , headers ['content-id' ])
105
- self .assertEqual ('2235038212 ' , headers ['etag' ])
114
+ self .assertEqual ('"1-4229094393" ' , headers ['etag' ])
106
115
self .assertEqual ('{\n "_id": "bar", \n '
107
- '"_rev": "2235038212 "\n }' , payload )
116
+ '"_rev": "1-4229094393 "\n }' , payload )
108
117
elif num == 1 :
109
118
self .assertEqual (is_multipart , True )
110
119
self .assertEqual ('foo' , headers ['content-id' ])
111
- self .assertEqual ('2779219239 ' , headers ['etag' ])
120
+ self .assertEqual ('"1-919589747" ' , headers ['etag' ])
112
121
113
122
partnum = 0
114
123
for headers , is_multipart , payload in payload :
@@ -117,7 +126,7 @@ def test_nested(self):
117
126
self .assertEqual ('application/json' ,
118
127
headers ['content-type' ])
119
128
self .assertEqual ('{\n "_id": "foo", \n "_rev": '
120
- '"2779219239 ", \n "something": '
129
+ '"1-919589747 ", \n "something": '
121
130
'"cool"\n }' , payload )
122
131
elif partnum == 1 :
123
132
self .assertEqual ('text/plain' , headers ['content-type' ])
@@ -127,9 +136,17 @@ def test_nested(self):
127
136
128
137
partnum += 1
129
138
139
+ elif num == 2 :
140
+ self .assertEqual (is_multipart , False )
141
+ self .assertEqual ('application/json' , headers ['content-type' ])
142
+ self .assertEqual ('baz' , headers ['content-id' ])
143
+ self .assertEqual ('"1-3482142493"' , headers ['etag' ])
144
+ self .assertEqual ('{\n "_id": "baz", \n '
145
+ '"_rev": "1-3482142493"\n }' , payload )
146
+
130
147
131
148
num += 1
132
- self .assertEqual (num , 2 )
149
+ self .assertEqual (num , 3 )
133
150
134
151
135
152
def suite ():
0 commit comments