Replace len(queryset) by queryset.count() in CommandsTestCase
Added energy & common to INSTALLED_APPS
Put creation of groups in a try catch to avoid Topic.DoesNotExist exceptions
Improved update_topic_cache signal handler