Conversation
| *.mo | ||
| *.pot | ||
|
|
||
| # Django stuff: |
There was a problem hiding this comment.
We don't use Django, I guess we can remove it from here
| local_settings.py | ||
| db.sqlite3 | ||
|
|
||
| # Flask stuff: |
| /site | ||
|
|
||
| # mypy | ||
| .mypy_cache/ No newline at end of file |
There was a problem hiding this comment.
Consider cleaning up this file from unnecessary stuff
| Run `pip install pycodestyle` to perform project code inspection using `pep8`. | ||
|
|
||
| ## Run tests | ||
| - To run unit tests execute `python unit.py`. |
There was a problem hiding this comment.
We will use nose as test runner, the command should be different
| ### Prerequisites | ||
| - Python [3.4 or higher](https://www.python.org/downloads/) | ||
| - Virtual environment [Virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) | ||
| - Cloned repository [git](git@github.com:repo/repo.git) |
| - Docker-compose [install](https://docs.docker.com/compose/install/) | ||
|
|
||
| ### Setting up the project | ||
| - create new virtual env `mkvirtualenv -p <path/to/python3> project_name`, |
There was a problem hiding this comment.
Maybe it's better to name virtual env to something like api-tests
| - activate the env by running `workon project_name` | ||
| - Install modules `pip install -r ~/<path to project>/requirements.pip` | ||
| - Clone repository [rest_Spring_Docker](https://github.com/momel/rest_Spring_Docker) | ||
| - Up clone image: `cd ~/<path to your cloned repository>` and `docker-compose up -d` |
There was a problem hiding this comment.
It's not clear what we actually doing with this command, consider changing wording
| raise RuntimeError('Test error!') | ||
|
|
||
|
|
||
| if __name__ == '__main__': |
There was a problem hiding this comment.
We will run our tests with nose test runner, please remove these lines of code from here
| @@ -0,0 +1,20 @@ | |||
| import unittest | |||
There was a problem hiding this comment.
This file should be moved to functional folder
| *$py.class | ||
|
|
||
| # C extensions | ||
| *.so |
There was a problem hiding this comment.
Unnecessary stuff for us now: C# or Shared objects (.so)
fix imports in unit/__init__.py and functional/__init__.py move __init__.py from root to tests cleaned up file .gitignore fixed link, virtualenv instruction, docker instruction, running instruction and added new lib on git on file readme.md add version for modules in requirements.pip
|
changed name class UserConstants to DefaultUser and add new clases BaseUrl, Endpoints in file constants.py changed functionality in file functional/__init__.py added new file tests_login.py in functional added new python package utils with files __init__ and helper.py empty tests/__init__.py change nose run instruction
Add new function at init file for test cool down time changes.
remove tests_login.py to the new branch pycodestyle fix in helper.py add configuration file .pylintrc ad pylint in requirements.pip
…eparate user and admin. In my tests I need login like user and like admin, and I think that it is best way. ATTENTION! You will need refactor your code, because now DefaultUser.user != admin. Add new function to get current cool down time. End write tests for /cooldowntime
- Add new functions to get/set token life time. - Add new function to get reset. other: - Add new tests for cool down time (positive, negative, boundary) - Add new file with all tests for token life - refactoring my own files
- Add new functions to get all users. - Change names of my own params, that must be understandable other: - Add new file with all tests for /users - refactoring my own files
…ssion and reset API and python3 style code fix add new file tests_admins for testing API /admin add new file login for testing API /login add new file logout for testing API /logout
fixed merge conflicts
Tests of locking users and smth else
…ith __init__ method
Heneralchuk, user tests
…, for example look file tests_login. It is the new architecture, when logic exists separately tests
replace the api functions from functional/__init__.py to the new file application/application.py
Implement ApiWrapper
refactoring code for new architecture
Application changes in tests
…RestPyTAC into doc_staff # Conflicts: # tests/functional/tests_locked.py
add tests for login, logout, admins with empty token
docstring fixes
ohrytsiuk->dev
refactoring docstrings
doc-strings in tests_cooldowntime and tests_locked updated
edited doc strings
Implement project sceleton