File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ from app .models .goal import Goal
12import pytest
23
4+ @pytest .mark .skip (reason = "No way to test this feature yet" )
5+ def test_goal_to_dict ():
6+ #Arrange
7+ new_goal = Goal (title = "Seize the Day!" )
8+
9+ #Act
10+ goal_dict = new_goal .to_dict ()
11+
12+ #Assert
13+ assert goal_dict == {
14+ "id" : None ,
15+ "title" : "Seize the Day!"
16+ }
17+
18+ @pytest .mark .skip (reason = "No way to test this feature yet" )
19+ def test_goal_from_dict ():
20+ #Arrange
21+ goal_dict = {
22+ "title" : "Seize the Day!" ,
23+ }
24+
25+ expected_goal = Goal (title = "Seize the Day!" )
26+
27+ #Act
28+ goal_obj = Goal .from_dict (goal_dict )
29+
30+ #Assert
31+ assert goal_obj .id is None
32+ assert goal_obj .title == expected_goal .title
333
434@pytest .mark .skip (reason = "No way to test this feature yet" )
535def test_get_goals_no_saved_goals (client ):
You can’t perform that action at this time.
0 commit comments