Skip to content

Commit

Permalink
[master][noticket][tests][xs]: Refactored test to be more reliable - …
Browse files Browse the repository at this point in the history
…123 was appearing in UUIDs in the page elsewhere.
  • Loading branch information
David Read committed Jan 30, 2012
1 parent c826b53 commit 5d5d884
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckan/tests/functional/api/model/test_relationships.py
Expand Up @@ -248,16 +248,16 @@ def update_annakarenina_parent_of_war_and_peace(self, comment=u'New comment.'):
def test_update_relationship_incorrectly(self):
self.create_annakarenina_parent_of_war_and_peace()
offset = self.relationship_offset('annakarenina', 'parent_of', 'warandpeace')
postparams = '%s=1' % self.dumps({'type': 123, 'object': 456, 'comment': 789})
postparams = '%s=1' % self.dumps({'type': 'cat', 'object': 'Matilda', 'comment': 'Tabby'})
# Should only be able to change the comment.
# Todo: validate this properly and return an error
# Currently it just ignores the changed type and subject/object
res = self.app.put(offset, params=postparams, status=[200],
extra_environ=self.extra_environ)
print res.body
assert '123' not in res.body
assert '456' not in res.body
assert '789' in res.body
assert 'cat' not in res.body
assert 'Matilda' not in res.body
assert 'Tabby' in res.body

def delete_annakarenina_parent_of_war_and_peace(self):
offset = self.relationship_offset('annakarenina', 'parent_of', 'warandpeace')
Expand Down

0 comments on commit 5d5d884

Please sign in to comment.