-
Notifications
You must be signed in to change notification settings - Fork 1
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
Recommandations #512
Recommandations #512
Conversation
8885c1f
to
457a398
Compare
@vincentporte Voilà un début de système de recommendations (complètement inutiles 🙈). Par rapport à la version initiale :
|
89f652d
to
f8c04d3
Compare
On merge “en l’état” et on itère : https://mattermost.incubateur.net/betagouv/pl/dtgkutcrg38qj8yxb7tjeyiewa |
909bdc1
to
17a2b3a
Compare
The eventual goal is to make recommendations for DORA services. For the first iteration, it simply outputs some text to guide professionals on the next action. The first version is extremely crude, so it’s untested, as most expectations are unknown.
d7a6083
to
5f78bc9
Compare
… button, box selected choices
69a0a8a
to
ff759e5
Compare
assertContains(response, '<iframe data-tally-src="https://tally.so/embed') | ||
assertNotContains(response, '<form method="post">') | ||
|
||
def test_user_has_permission(self, db, client): | ||
client.force_login(UserFactory(with_perm=[Permission.objects.get(codename="add_dsp")])) | ||
response = client.get(reverse("surveys:dsp_create")) | ||
assertContains(response, '<form method="post">') | ||
assertNotContains(response, '<iframe data-tally-src="https://tally.so/embed') |
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 éviter que ces assertions assertNotContains
ne tombent en désuetudes, on peut utiliser un attribut sur la classe.
Exemple :
form_html = '<form method="post">'
tally_html = '<iframe data-tally-src="https://tally.so/embed'
def test_user_has_no_permission(self, db, client):
# ...
assertContains(response, self.tally_html)
assertNotContains(response, self.form_html)
def test_user_has_permission(self, db, client):
# ...
assertContains(response, self.form_html)
assertNotContains(response, self.tally_html)
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.
Ça m’a l’air OK :)
ff759e5
to
005300a
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.
✋🏿 collaborative work 🎸
Description
Recommander des actions suite au diagnostic parcours IAE. Pour le moment, simplissime : une réponse correspond à une recommendations.
Gestion des accès avec la permission
surveys.add_dsp
TODO
Closes #511