-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement hardcoded question page and test
Our first end-to-end test
- Loading branch information
1 parent
cc5afcb
commit 378ad72
Showing
6 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
consultation_analyser/consultations/templates/show_question.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
How should funding be allocated? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from django.urls import path | ||
from .views import show_question | ||
|
||
urlpatterns = [path("questions/how-should-funding-be-allocated", show_question)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
# Create your views here. | ||
from django.shortcuts import render | ||
from django.http import HttpRequest | ||
|
||
|
||
def show_question(request: HttpRequest): | ||
return render(request, "show_question.html") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
def test_get_question_page(client): | ||
response = client.get("/questions/how-should-funding-be-allocated") | ||
assert "How should funding be allocated?" in str(response.content) |