kfet.tests.testcases embed mixins for TestCase:
- TestCaseMixin provides assertion helpers,
- ViewTestCaseMixin provides a few basic tests, which are common to
every view.
kfet.tests.utils provides helpers for users and permissions management.
Each kfet view get a testcase (at least very basic) in
kfet.tests.test_views.
Setup de développement local
Développement sans Vagrant
- Ajoute un fichier de settings pour développer en local sans vagrant :
'cof/settings/local.py'. Il s'agit du fichier utilisé par défaut
si 'DJANGO_SETTINGS_MODULE' n'est pas dans l'environnement.
- Simplifie le README en conséquence.
Vagrant
La conf de production étant en cours de modification, on répercute ici
certaines de ces modifications.
- Front server: passe à nginx (à la place de apache).
- DB: passe à postgresql (à la place de mysql).
- La conf nginx sert le site (port 8080) derrière '/gestion/', à
l'exception des fichiers 'static' et 'media'.
- Ajout de `SERVER_EMAIL` dans les secrets pour pouvoir l'éditer en
production.
- Changement de `STATIC_ROOT` en production.
See merge request !242
Status is mainly computed in Python. That fix inconsistent datetime between
client and server.
Client only receives status and keep timestamp of last received ws msg.
kfet.open app
- Base data (raw_open, last_update...) is stored and shared through cache system.
- 2 websockets groups: one for team users, one for other users.
- UI is initialized and kept up-to-date with WS.
- raw_open and force_close can be updated with standard HTTP requests.
At this time, there isn't any restriction on raw_open view. Common sense tell us
to change this behavior.
Misc
- Clean channels routing.
- 'PermConsumerMixin': user who sent the message is available as argument in
connection_groups method, which returns groups to which the user should be
appended on websocket connection (and discarded on disconnection).
- New kfet.utils module: should be used for mixins, whatever is useful and not concerns
the kfet app.
- Clean JS dependencies.