Closed timeyyy closed 6 years ago
When testing with django's TestCase, after a test django is successfuly deleting all database entries. However this function is not being called.
TestCase
@receiver([post_save, post_delete], sender=NotificationType) def clear_notification_type_cache(*args, **kwargs): global _notification_type_cache print('CLEARNING NOTIFICATION TYPE CACHE', len(_notification_type_cache)) _notification_type_cache = {}
Calling this function manually works great to fix my tests, i'm not sure if there is a bug lurking around though...
covered by https://github.com/benjaoming/django-nyt/issues/34
When testing with django's
TestCase
, after a test django is successfuly deleting all database entries. However this function is not being called.Calling this function manually works great to fix my tests, i'm not sure if there is a bug lurking around though...