Lines Matching refs:filepath
19 filepath = mock.Mock()
20 filepath.name = "logo.png"
21 filepath.open = mock.mock_open()
22 filepath.with_name.return_value = gz_filepath
24 file_sender = FileResponse(filepath)
29 assert not filepath.open.called
40 filepath = mock.Mock()
41 filepath.name = "logo.png"
42 filepath.open = mock.mock_open()
43 filepath.with_name.return_value = gz_filepath
44 filepath.stat.return_value = mock.MagicMock()
45 filepath.stat.st_size = 1024
47 file_sender = FileResponse(filepath)
52 assert filepath.open.called
63 filepath = mock.Mock()
64 filepath.name = "logo.png"
65 filepath.open = mock.mock_open()
66 filepath.with_name.return_value = gz_filepath
67 filepath.stat.return_value = mock.MagicMock()
68 filepath.stat.st_size = 1024
70 file_sender = FileResponse(filepath)
75 assert filepath.open.called
88 filepath = mock.Mock()
89 filepath.name = "logo.png"
90 filepath.open = mock.mock_open()
91 filepath.with_name.return_value = gz_filepath
92 filepath.stat.return_value = mock.MagicMock()
93 filepath.stat.st_size = 1024
95 file_sender = FileResponse(filepath)
100 assert filepath.open.called
107 filepath = mock.Mock()
108 filepath.name = "logo.png"
109 filepath.open = mock.mock_open()
110 filepath.stat.return_value = mock.MagicMock()
111 filepath.stat.st_size = 1024
113 file_sender = FileResponse(filepath, status=203)