Пример #1
0
def testImageDataJson (gatewaywrapper, author_testimg):
    iid = author_testimg.getId()
    r = fakeRequest()
    v = views.imageData_json(r, iid=iid, server_id=1, conn=gatewaywrapper.gateway, _internal=True)
    assert type(v) == type('')
    assert '"width": 512' in v
    assert '"split_channel":' in v
    assert '"pixel_range": [-32768, 32767]' in v
Пример #2
0
 def testImageData (self):
     self.loginAsAuthor()
     iid = self.getTestImage().getId()
     r = fakeRequest()
     v = views.imageData_json(r, iid=iid, server_id=1, conn=self.gateway, _internal=True)
     self.assert_(type(v) == type(''))
     self.assert_('"width": 512' in v)
     self.assert_('"split_channel":' in v)
     self.assert_('"pixel_range": [-32768, 32767]' in v)