(self, mock_get_db)
| 44 | @mock.patch.object(video_service, 'restart', do_nothing) |
| 45 | @mock.patch.object(db.users.db_connection, 'get') |
| 46 | def test_cannot_register_duplicate_users(self, mock_get_db): |
| 47 | with tempfile.NamedTemporaryFile() as temp_file: |
| 48 | mock_get_db.return_value = db.store.create_or_open(temp_file.name) |
| 49 | |
| 50 | auth.register('pilot', '12345', auth.Role.ADMIN) |
| 51 | with self.assertRaises(db.users.UserAlreadyExistsError): |
| 52 | auth.register('pilot', 'p4ssw0rd', auth.Role.ADMIN) |
| 53 | |
| 54 | @mock.patch.object(video_service, 'restart', do_nothing) |
| 55 | @mock.patch.object(db.users.db_connection, 'get') |
nothing calls this directly
no outgoing calls
no test coverage detected