Задание

We ... a test when the teacher came into the classroom.

were writing

wrote