python web literacy Flashcards

1
Q

statements about doctests

A

Tests can be either at the top of the source or within the function body

It is not compulsory for each function to have a test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Using the Response object returned by a GET request call, what property can you use to check that the HTTP request was successfull?

A

status_code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of these header fields in a Response object can be used to check whether the response content is in JSON format?

A

Content-Type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the template-definition language supported by Flask?

A

Jinja

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of these Flask functions can be used to render an HTML file?

A

render_template

How well did you know this?
1
Not at all
2
3
4
5
Perfectly