-
Notifications
You must be signed in to change notification settings - Fork 160
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
Permet la gestion de contributeurs sur les billets #6551
Permet la gestion de contributeurs sur les billets #6551
Conversation
38c735b
to
dba1872
Compare
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.
Pas encore testé, mais déjà deux petits retours sur le code.
types = ["TUTORIAL", "ARTICLE", "OPINION"] | ||
for type in types: | ||
self.content.type = type | ||
self.content.save() | ||
response = self.client.post(self.form_url, self.form_data) | ||
self.assertRedirects(response, self.content_url) |
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.
types = ["TUTORIAL", "ARTICLE", "OPINION"] | |
for type in types: | |
self.content.type = type | |
self.content.save() | |
response = self.client.post(self.form_url, self.form_data) | |
self.assertRedirects(response, self.content_url) | |
for type in CONTENT_TYPE_LIST: | |
with self.subTest(type): | |
self.content.type = type | |
self.content.save() | |
response = self.client.post(self.form_url, self.form_data) | |
self.assertRedirects(response, self.content_url) |
En rajoutant
from zds.tutorialv2.models import CONTENT_TYPE_LIST
Comme ça, le jour où on rajoute un autre type de contenu, ce sera transparent. Le subTest
permet de voir plus facilement quel cas fait planter le test.
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.
Bonne idée, c'est fait.
dba1872
to
f90fb4d
Compare
f90fb4d
to
edab932
Compare
edab932
to
cacbf5a
Compare
64a7c95
to
911a76a
Compare
911a76a
to
631c430
Compare
e82d5ff
to
4a0ce89
Compare
4a0ce89
to
e77c2d5
Compare
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.
QA OK ✔️
Permet la gestion (ajout, suppression) des contributeurs sur les billets. Encore une partie du découpage de #6441.
On voit que la refactorisation des templates de publication porte ses fruits. La partie template a pu être gérée en modifiant une seule ligne de configuration.
Contrôle qualité
Créer des billets et jouer avec les contributeurs.
Constater qu'ils sont bien ajoutés, supprimés.
Constater qu'ils sont bien affichés comme sur les autres contenus.