Developer Journal: 28 April 2020
Posted on Tue 28 April 2020 in dev-journal • Tagged with developer journal
Yesterday I wrote a very simple test for a delete route:
@patch('app.models.launch_task')
def test_delete_removes_worker_from_db(self, mock_launch):
mock_launch.return_value = ""
login_user(self.client, email=self.user.email, password='password')
self.client.delete(self.base_url)
workers = SiteWorker.query.all()
self.assertEqual(len(workers), 0)
To allow that test to pass …
Continue reading