def setUp(self): super(TestSimpleBackend, self).setUp() settings.SENDFILE_BACKEND = 'mediasnake_sendfile.backends.simple' _get_sendfile.clear() self.filepath = self.ensure_file('readme.txt', length=90) f = open(self.filepath, 'rb') self.filecontent = f.read() f.close()
def setUp(self): super(TestNginxBackend, self).setUp() settings.SENDFILE_BACKEND = 'mediasnake_sendfile.backends.nginx' settings.SENDFILE_ROOT = self.TEMP_FILE_ROOT settings.SENDFILE_URL = '/private' _get_sendfile.clear()
def setUp(self): super(TestSendfile, self).setUp() # set ourselves to be the sendfile backend settings.SENDFILE_BACKEND = 'mediasnake_sendfile.tests' _get_sendfile.clear()
def setUp(self): super(TestXSendfileBackend, self).setUp() settings.SENDFILE_BACKEND = 'mediasnake_sendfile.backends.xsendfile' _get_sendfile.clear()