Skip to content

Conversation

@ohrytsiuk
Copy link

Implement project sceleton

.gitignore Outdated
*.mo
*.pot

# Django stuff:
Copy link

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:
Copy link

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
Copy link

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`.
Copy link

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)
Copy link

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`,
Copy link

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`
Copy link

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__':
Copy link

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
Copy link

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

Copy link

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

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
@ohrytsiuk
Copy link
Author

This one was right?
"- create new virtual env mkvirtualenv -p <path/to/python3> project_name"
from readme.md
mkvirtualenv api-tests -p <path/to/python3>
for example:
mkvirtualenv api-tests -p /usr/bin/python3
made new virtualenv api-tests

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
ykobuk and others added 5 commits October 26, 2018 13:05
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
abertash and others added 14 commits October 27, 2018 03:25
…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
Shtepsel and others added 30 commits November 1, 2018 13:15
fixed merge conflicts
Tests of locking users and smth else
…, 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
refactoring code for new architecture
…RestPyTAC into doc_staff

# Conflicts:
#	tests/functional/tests_locked.py
add tests for login, logout, admins with empty token
docstring fixes
doc-strings in tests_cooldowntime and tests_locked updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants