@@ -22,20 +22,20 @@ def test_flat(self):
2222--===============1946781859==
2323Content-Type: application/json
2424Content-ID: bar
25- ETag: 2235038212
25+ ETag: "1-4229094393"
2626
2727{
28- "_id": "bar",
29- "_rev": "2235038212 "
28+ "_id": "bar",
29+ "_rev": "1-4229094393 "
3030}
3131--===============1946781859==
3232Content-Type: application/json
3333Content-ID: foo
34- ETag: 2779219239
34+ ETag: "1-2182689334"
3535
3636{
37- "_id": "foo",
38- "_rev": "2779219239",
37+ "_id": "foo",
38+ "_rev": "1-2182689334",
3939 "something": "cool"
4040}
4141--===============1946781859==--
@@ -47,14 +47,14 @@ def test_flat(self):
4747 self .assertEqual ('application/json' , headers ['content-type' ])
4848 if num == 0 :
4949 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 )
5353 elif num == 1 :
5454 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 )
5858 num += 1
5959 self .assertEqual (num , 2 )
6060
@@ -65,23 +65,23 @@ def test_nested(self):
6565--===============1946781859==
6666Content-Type: application/json
6767Content-ID: bar
68- ETag: 2235038212
68+ ETag: "1-4229094393"
6969
7070{
7171 "_id": "bar",
72- "_rev": "2235038212 "
72+ "_rev": "1-4229094393 "
7373}
7474--===============1946781859==
7575Content-Type: multipart/mixed; boundary="===============0909101126=="
7676Content-ID: foo
77- ETag: 2779219239
77+ ETag: "1-919589747"
7878
7979--===============0909101126==
8080Content-Type: application/json
8181
8282{
8383 "_id": "foo",
84- "_rev": "2779219239 ",
84+ "_rev": "1-919589747 ",
8585 "something": "cool"
8686}
8787--===============0909101126==
@@ -93,6 +93,15 @@ def test_nested(self):
9393
9494Regards, Chris
9595--===============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+ }
96105--===============1946781859==--
97106'''
98107 num = 0
@@ -102,13 +111,13 @@ def test_nested(self):
102111 self .assertEqual (is_multipart , False )
103112 self .assertEqual ('application/json' , headers ['content-type' ])
104113 self .assertEqual ('bar' , headers ['content-id' ])
105- self .assertEqual ('2235038212 ' , headers ['etag' ])
114+ self .assertEqual ('"1-4229094393" ' , headers ['etag' ])
106115 self .assertEqual ('{\n "_id": "bar", \n '
107- '"_rev": "2235038212 "\n }' , payload )
116+ '"_rev": "1-4229094393 "\n }' , payload )
108117 elif num == 1 :
109118 self .assertEqual (is_multipart , True )
110119 self .assertEqual ('foo' , headers ['content-id' ])
111- self .assertEqual ('2779219239 ' , headers ['etag' ])
120+ self .assertEqual ('"1-919589747" ' , headers ['etag' ])
112121
113122 partnum = 0
114123 for headers , is_multipart , payload in payload :
@@ -117,7 +126,7 @@ def test_nested(self):
117126 self .assertEqual ('application/json' ,
118127 headers ['content-type' ])
119128 self .assertEqual ('{\n "_id": "foo", \n "_rev": '
120- '"2779219239 ", \n "something": '
129+ '"1-919589747 ", \n "something": '
121130 '"cool"\n }' , payload )
122131 elif partnum == 1 :
123132 self .assertEqual ('text/plain' , headers ['content-type' ])
@@ -127,9 +136,17 @@ def test_nested(self):
127136
128137 partnum += 1
129138
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+
130147
131148 num += 1
132- self .assertEqual (num , 2 )
149+ self .assertEqual (num , 3 )
133150
134151
135152def suite ():
0 commit comments