def test_create_private_tileset(self):
"""Test to make sure that when we create a private dataset, we can only
access it if we're logged in as the proper user
"""
upload_file =open('data/wgEncodeCaltechRnaSeqHuvecR1x75dTh1014IlnaPlusSignalRep2.hitile', 'rb')
private_obj = tm.Tileset.objects.create(
datafile=dcfu.SimpleUploadedFile(upload_file.name, upload_file.read()),
filetype='hitile',
private=True,
owner=self.user1
)
c = dt.Client()
c.login(username='user1', password='pass')
returned = json.loads(
self.client.get(
'/api/v1/tileset_info/?d={uuid}'.format(uuid=private_obj.uuid)
).content.decode('utf-8')
)
评论列表
文章目录