[BUGFIX] Properly reset package manager in unit tests