'/documents/upload -> Test uploading a document'

def test_document_isuploaded(self):

    f = SimpleUploadedFile('test_img_file.gif', self.imgfile.read(), 'image/gif')
    m = Map.objects.all()[0]
    self.client.login(username='admin', password='admin')
    response = self.client.post(reverse('document_upload'), data={'file': f, 'title': 'uploaded_document', 'q': m.id, 'type': 'map', 'permissions': '{"users":{"AnonymousUser":    ["view_resourcebase"]}}'}, follow=True)
    self.assertEquals(response.status_code, 200)
