Show More
@@ -237,7 +237,8 b' class PostManager(models.Manager):' | |||||
237 |
|
237 | |||
238 | if not post.is_opening(): |
|
238 | if not post.is_opening(): | |
239 | thread = et.SubElement(content_tag, TAG_THREAD) |
|
239 | thread = et.SubElement(content_tag, TAG_THREAD) | |
240 | thread.text = str(post.get_thread().get_opening_post_id()) |
|
240 | thread_id = et.SubElement(thread, TAG_ID) | |
|
241 | post.get_thread().get_opening_post().global_id.to_xml_element(thread_id) | |||
241 | else: |
|
242 | else: | |
242 | # TODO Output tags here |
|
243 | # TODO Output tags here | |
243 | pass |
|
244 | pass |
@@ -67,14 +67,16 b' class KeyTest(TestCase):' | |||||
67 | '<id key="%s" local-id="%d" type="%s" />' |
|
67 | '<id key="%s" local-id="%d" type="%s" />' | |
68 | '<title>test_title</title>' |
|
68 | '<title>test_title</title>' | |
69 | '<text>[post]%d[/post]</text>' |
|
69 | '<text>[post]%d[/post]</text>' | |
70 | '<thread>%d</thread>' |
|
70 | '<thread><id key="%s" local-id="%d" type="%s" /></thread>' | |
71 | '<pub-time>%s</pub-time>' |
|
71 | '<pub-time>%s</pub-time>' | |
72 | '</content>' % ( |
|
72 | '</content>' % ( | |
73 | key.public_key, |
|
73 | key.public_key, | |
74 | reply_post.id, |
|
74 | reply_post.id, | |
75 | key.key_type, |
|
75 | key.key_type, | |
76 | post.id, |
|
76 | post.id, | |
|
77 | key.public_key, | |||
77 | post.id, |
|
78 | post.id, | |
|
79 | key.key_type, | |||
78 | str(reply_post.get_pub_time_epoch()), |
|
80 | str(reply_post.get_pub_time_epoch()), | |
79 | ) in response, |
|
81 | ) in response, | |
80 | 'Wrong XML generated for the GET response.') |
|
82 | 'Wrong XML generated for the GET response.') |
@@ -14,7 +14,7 b'' | |||||
14 | <id key="id1" type="ecdsa" local-id="1" /> |
|
14 | <id key="id1" type="ecdsa" local-id="1" /> | |
15 | <title>13</title> |
|
15 | <title>13</title> | |
16 | <text>Thirteen</text> |
|
16 | <text>Thirteen</text> | |
17 |
<thread> |
|
17 | <thread><id key="id1" type="ecdsa" local-id="2" /></thread> | |
18 | <pub-time>12</pub-time> |
|
18 | <pub-time>12</pub-time> | |
19 | <!-- |
|
19 | <!-- | |
20 | Images are saved as attachments and included in the |
|
20 | Images are saved as attachments and included in the |
General Comments 0
You need to be logged in to leave comments.
Login now