2012-02-01から1ヶ月間の記事一覧

django tastypieで、postのテスト

from django.test import TestCase class SimpleTest(TestCase): jsonString = '{"name":"hello","country":"JPN"}' response = self.client.post('/api/v1/person/',data=jsonString, content_type='application/json') print "----" print response.conten…

tastypie のテストコード

https://github.com/toastdriven/django-tastypie/blob/master/tests/basic/tests/http.py connection = self.get_connection() post_data = '{"content": "A new post.", "is_active": true, "title": "New Title", "slug": "new-title", "user": "/api/v1/…

git で特定のブランチへ、pushする

git

ローカルにある、branch2をremote(origin)のbranch1へpushする。 git push origin branch2:branch1