The course unit test assumes the number of db call. This assumption is correct in vanilla moodle only. Once some plugins installed their observers may do extra db calls. Due to caching the number of actual db calls in the unit test may be fewer.