Skip to content
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

Merged
merged 6 commits into from
Feb 13, 2017

Conversation

Anto59290
Copy link
Contributor

Q R
Type de modification correction de bug / évolution
Ticket(s) (issue(s)) concerné(s) #3948

QA

  • Publier un tuto avec un tag A
  • Publier un article avec un tag B
  • Dans le menu déroulant le tag A apparait pour les tutos, mais pas pour les articles
  • Inversement : le tag B apparait pour les articles mais pour les tutos.

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.)

@coveralls
Copy link

coveralls commented Jan 20, 2017

Coverage Status

Coverage decreased (-0.004%) to 87.008% when pulling bc5985e on Anto59290:3948_menu_tag into be43125 on zestedesavoir:dev.

@coveralls
Copy link

coveralls commented Jan 20, 2017

Coverage Status

Coverage decreased (-0.004%) to 87.008% when pulling bc5985e on Anto59290:3948_menu_tag into be43125 on zestedesavoir:dev.

content.public_version = published
content.save()

content = PublishableContentFactory(type="ARTICLE")
Copy link
Member

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()

@coveralls
Copy link

coveralls commented Jan 23, 2017

Coverage Status

Coverage decreased (-0.004%) to 87.008% when pulling 14118a3 on Anto59290:3948_menu_tag into be43125 on zestedesavoir:dev.

@coveralls
Copy link

coveralls commented Jan 23, 2017

Coverage Status

Coverage decreased (-0.004%) to 87.008% when pulling 14118a3 on Anto59290:3948_menu_tag into be43125 on zestedesavoir:dev.

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

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 ?

Copy link
Member

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

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.

Copy link
Member

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.

Copy link
Member

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)

@pierre-24 pierre-24 added C-Back Concerne le back-end Django QA svp labels Feb 13, 2017
@pierre-24
Copy link
Member

Rapport de QA: ok, ça marche très bien :)

@pierre-24 pierre-24 merged commit 94480bb into zestedesavoir:dev Feb 13, 2017
@pierre-24 pierre-24 removed the QA svp label Feb 13, 2017
@pierre-24 pierre-24 added this to the Version de développement milestone Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Back Concerne le back-end Django
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants