-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
.gitignore
Outdated
| *.mo | ||
| *.pot | ||
|
|
||
| # Django stuff: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use Django, I guess we can remove it from here
.gitignore
Outdated
| local_settings.py | ||
| db.sqlite3 | ||
|
|
||
| # Flask stuff: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - we don't use flask
.gitignore
Outdated
| /site | ||
|
|
||
| # mypy | ||
| .mypy_cache/ No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider cleaning up this file from unnecessary stuff
README.md
Outdated
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will use nose as test runner, the command should be different
README.md
Outdated
| ### 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wong git link
README.md
Outdated
| - 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's better to name virtual env to something like api-tests
README.md
Outdated
| - 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear what we actually doing with this command, consider changing wording
__init__.py
Outdated
| raise RuntimeError('Test error!') | ||
|
|
||
|
|
||
| if __name__ == '__main__': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will run our tests with nose test runner, please remove these lines of code from here
__init__.py
Outdated
| @@ -0,0 +1,20 @@ | |||
| import unittest | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be moved to functional folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, to tests folder
.gitignore
Outdated
| *$py.class | ||
|
|
||
| # C extensions | ||
| *.so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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