Commit 9be8335a authored by Stefan Wolfsheimer's avatar Stefan Wolfsheimer
Browse files

add requirements.txt for b2share connectors, make unit tests more flexible to...

add requirements.txt for b2share connectors, make unit tests more flexible to execute from any location, added README.txt for basic installation instructions
parent 8047ce7b
# B2share connectors
## Install requirements
```
pipenv --python 2 install -r requirements.txt
```
## Run unit tests
```
pipenv --python 2 shell
py.test ../scripts/tests/testB2shareConnectionClient
```
## Run connectors
```
pipenv --python 2 shell
python b2shareclientCLI.py ...
```
python-irodsclient
jsonpatch
requests
configparser
mock
pytest
import unittest
from mock import MagicMock, patch
from os.path import dirname
from os.path import abspath
import json
import os
import sys
sys.path.append("../../cmd")
sys.path.insert(0,
os.path.join(dirname(dirname(dirname(dirname(abspath(__file__))))),
"cmd"))
import b2shareclientCLI as b2shareclientCLI
import logging
......@@ -166,4 +171,4 @@ class B2shareClientCLITest(unittest.TestCase):
self.assertEqual(expectedResult, filePaths)
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
unittest.main()
......@@ -2,13 +2,19 @@
# -*- coding: utf-8 -*-
import unittest
from mock import MagicMock, patch
import os
from os.path import dirname
from os.path import abspath
import json
import sys
import logging
test_logger = logging.getLogger('B2shareClientTest')
sys.path.append("../../cmd")
sys.path.insert(0,
os.path.join(dirname(dirname(dirname(dirname(abspath(__file__))))),
"cmd"))
from b2shareclient import B2shareClient
class B2shareClientTest(unittest.TestCase):
......@@ -136,4 +142,4 @@ class B2shareClientTest(unittest.TestCase):
self.assertTrue(bool(record_id))
if __name__ == '__main__':
unittest.main()
\ No newline at end of file
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment