예제 #1
0
 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/')
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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/')
예제 #5
0
 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)