Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfarkas committed Feb 21, 2018
1 parent dd3da80 commit 389c02f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion api/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ class FileProcessor(object):
def __init__(self, base, presistent_fs):
self.base = base
self._tempdir_name = str(uuid.uuid4())
self._temp_fs = fs.subfs.SubFS(presistent_fs, fs.path.join('tmp', self._tempdir_name))
self._presistent_fs = presistent_fs
self._presistent_fs.makedirs(fs.path.join('tmp', self._tempdir_name), recreate=True)
self._temp_fs = fs.subfs.SubFS(presistent_fs, fs.path.join('tmp', self._tempdir_name))

def store_temp_file(self, src_path, dest_path):
if not isinstance(src_path, unicode):
Expand Down
1 change: 1 addition & 0 deletions api/handlers/listhandler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import bson
import copy
import datetime
Expand Down
Empty file.
Empty file removed raml/schemas/definitions/file.json
Empty file.
2 changes: 2 additions & 0 deletions swagger/schemas/definitions/file.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions":{
"_id": { "type": "string" },
"name": { "type": "string" },
"file-type": { "type": "string" },
"mimetype": { "type": "string" },
Expand Down Expand Up @@ -44,6 +45,7 @@
"file": {
"type": "object",
"properties": {
"_id": {"$ref":"#/definitions/_id"},
"name": {"$ref":"#/definitions/name"},
"type": {"$ref":"#/definitions/file-type"},
"mimetype": {"$ref":"#/definitions/mimetype"},
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/python/test_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ def idz(s):
return '<id:' + s + '>'

# resolve root/group/project/session/acquisition/file with id
r = as_admin.post('/resolve', json={'path': [idz(group), idz(project), idz(session), idz(acquisition), acquisition_file]})
r = as_admin.post('/resolve', json={'path': [idz(group), idz(project), idz(session), idz(acquisition), idz(acquisition_file)]})
result = r.json()
assert r.ok
assert path_in_result([group, project, session, acquisition, acquisition_file], result)
assert path_in_result([group, project, session, acquisition, acquisition_file_id], result)
assert result['children'] == []

# try to resolve non-existent root/group/project/session/acquisition/child
Expand Down

0 comments on commit 389c02f

Please sign in to comment.