@@ -33,23 +33,23 @@ def test_menu_calls_create_blog(self):
33
33
34
34
def test_menu_calls_print_blogs (self ):
35
35
with patch ('builtins.input' ) as mocked_input :
36
- with patch ('section1 .video_code.app.print_blogs' ) as mocked_print_blogs :
36
+ with patch ('section3 .video_code.app.print_blogs' ) as mocked_print_blogs :
37
37
mocked_input .side_effect = ('l' , 'q' )
38
38
app .menu ()
39
39
40
40
mocked_print_blogs .assert_called ()
41
41
42
42
def test_menu_calls_ask_read_blogs (self ):
43
43
with patch ('builtins.input' ) as mocked_input :
44
- with patch ('section1 .video_code.app.ask_read_blog' ) as mocked_ask_read_blog :
44
+ with patch ('section3 .video_code.app.ask_read_blog' ) as mocked_ask_read_blog :
45
45
mocked_input .side_effect = ('r' , 'Test' , 'q' )
46
46
app .menu ()
47
47
48
48
mocked_ask_read_blog .assert_called ()
49
49
50
50
def test_menu_calls_ask_create_post (self ):
51
51
with patch ('builtins.input' ) as mocked_input :
52
- with patch ('section1 .video_code.app.ask_create_post' ) as mocked_ask_create_post :
52
+ with patch ('section3 .video_code.app.ask_create_post' ) as mocked_ask_create_post :
53
53
mocked_input .side_effect = ('p' , 'Test' , 'New Post' , 'New Content' , 'q' )
54
54
app .menu ()
55
55
@@ -72,7 +72,7 @@ def test_ask_create_blog(self):
72
72
73
73
def test_ask_read_blog (self ):
74
74
with patch ('builtins.input' , return_value = 'Test' ):
75
- with patch ('section1 .video_code.app.print_posts' ) as mocked_print_posts :
75
+ with patch ('section3 .video_code.app.print_posts' ) as mocked_print_posts :
76
76
app .ask_read_blog ()
77
77
78
78
mocked_print_posts .assert_called_with (app .blogs ['Test' ])
@@ -81,7 +81,7 @@ def test_print_posts(self):
81
81
blog = app .blogs ['Test' ]
82
82
blog .create_post ('Post title' , 'Post content' )
83
83
84
- with patch ('section1 .video_code.app.print_post' ) as mocked_print_post :
84
+ with patch ('section3 .video_code.app.print_post' ) as mocked_print_post :
85
85
app .print_posts (blog )
86
86
87
87
mocked_print_post .assert_called_with (blog .posts [0 ])
0 commit comments