-
Notifications
You must be signed in to change notification settings - Fork 161
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
Les tags dans les menus déroulant des contenus sont filtrés par type. #4164
Conversation
content.public_version = published | ||
content.save() | ||
|
||
content = PublishableContentFactory(type="ARTICLE") |
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.
pour réduire le nombre de lignes tu peux faire :
content = PublishedContentFactory(type="ARTICLE", author_list=[ProfileFactory().user])
content.add_tags(tags_article)
content.save()
@@ -27,6 +38,9 @@ def setUp(self): | |||
self.forum12.group.add(Group.objects.filter(name='staff').first()) | |||
self.forum12.save() | |||
|
|||
# don't build PDF to speed up the tests | |||
settings.ZDS_APP['content']['build_pdf_when_published'] = False |
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.
C'est nécessaire ça ?
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.
c'est marqué au dessus.
shutil.rmtree(settings.MEDIA_ROOT) | ||
|
||
# re-active PDF build | ||
settings.ZDS_APP['content']['build_pdf_when_published'] = True |
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.
Pareil ici, j'ai peur que si on lance les tests sur plusieurs thread ou avec plusieurs processus ça passe pas.
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.
en effet vaut mieux utiliser override_settings.
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.
Mmmh, en effet. Sauf que je le reconnais bien, ce bout de code, il est de moi, et personne m'avais jamais rien dit :p (y'a son copain qui traine dans un autre fichier de test, note)
Rapport de QA: ok, ça marche très bien :) |
QA
Concrètement sur la prod ça évite que l'on ait le tag Interview dans le menu tuto : ce lien mène à une 404. Du coup on aura une meilleure expérience utilisateur (navigation à facette, etc.)