def test_send(self): app = Webapp.objects.get(pk=337141) app.privacy_policy = 'privacy policy text' field = LargeTextField(view_name='app-privacy-policy-detail') field.context = {'request': self.request} url = field.field_to_native(app, None) self.assertApiUrlEqual(url, '/apps/app/337141/privacy/')
def test_receive(self): data = 'privacy policy text' into = {} field = LargeTextField(view_name='app-privacy-policy-detail') field.context = {'request': self.request} field.field_from_native({'field_name': data}, None, 'field_name', into) eq_(into['field_name'], data)
def test_receive(self): data = "privacy policy text" into = {} field = LargeTextField(view_name="app-privacy-policy-detail") field.context = {"request": self.request} field.field_from_native({"field_name": data}, None, "field_name", into) eq_(into["field_name"], data)