Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a31ff4c

Browse files
Fixed imports
1 parent 664a7cf commit a31ff4c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def get_users():
4848

4949
all_users.sort(key=lambda x: x["id"], reverse=True)
5050

51-
return jsonify(users), 200
51+
return jsonify(all_users), 200
5252

5353

5454
@app.route("/users/login", methods=["POST"])

‎tests/test_app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import pytest, requests, json
2-
frommainimport app
2+
import main
33
import config
44

55

66
@pytest.fixture
77
def client():
8-
app.config.from_object(config.TestingConfig)
9-
with app.test_client() as client:
10-
with app.app_context():
8+
main.app.config.from_object(config.TestingConfig)
9+
with main.app.test_client() as client:
10+
with main.app.app_context():
1111
yield client
1212

1313

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /