8000 Remove base_test.py from section2, as neither app or app_context are … · coduya/testing-python-apps@5a02a2f · GitHub
[go: up one dir, main page]

Skip to content

Commit 5a02a2f

Browse files
committed
Remove base_test.py from section2, as neither app or app_context are required. Added section2 starter code.
1 parent 9387bfa commit 5a02a2f

File tree

6 files changed

+14
-33
lines changed

6 files changed

+14
-33
lines changed

section2/video_code/readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
This is built with Flask, Flask-RESTful, Flask-JWT, and Flask-SQLAlchemy.
44

55
Deployed on Heroku.
6+
7+
To get started:
8+
9+
- Create a virtualenv for this project
10+
- Install requirements using `pip install -r requirements.txt`

section2/video_code/tests/base_test.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

section2/video_code/tests/unit/models/item_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
from unittest import TestCase
2+
13
from models.item import ItemModel
2-
from tests.base_test import BaseTest
34

45

5-
class ItemTest(BaseTest):
6+
class ItemTest(TestCase):
67
def test_create_item(self):
78
# Notice this won't work with PostgreSQL, because of
89
# foreign key constraints.

section2/video_code/tests/unit/models/store_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
from unittest import TestCase
2+
13
from models.store import StoreModel
2-
from tests.base_test import BaseTest
34

45

5-
class StoreTest(BaseTest):
6+
class StoreTest(TestCase):
67
def test_create_store(self):
78
store = StoreModel('test')
89

section2/video_code/tests/unit/models/user_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
from unittest import TestCase
2+
13
from models.user import UserModel
2-
from tests.base_test import BaseTest
34

45

5-
class UserTest(BaseTest):
6+
class UserTest(TestCase):
67
def test_create_user(self):
78
user = UserModel('test', 'abcd')
89

section2_starter_source_code.zip

6.23 KB
Binary file not shown.

0 commit comments

Comments
 (0)
0