2012-06-28から1日間の記事一覧
POSTで画像アップロードがあるフォームのテストを書く方法を調べる機会があったのでメモしておく from django.test import TestCase class UploadTest(TestCase): def test_upload(self): with open('test.jpg') as f: res = self.client.post('images/uploa…
POSTで画像アップロードがあるフォームのテストを書く方法を調べる機会があったのでメモしておく from django.test import TestCase class UploadTest(TestCase): def test_upload(self): with open('test.jpg') as f: res = self.client.post('images/uploa…