Created
October 9, 2012 05:03
-
-
Save felipe-prenholato/3856723 to your computer and use it in GitHub Desktop.
Show how use singletons in tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| from django.test import TestCase | |
| from breadcrumbs.breadcrumbs import Breadcrumbs | |
| class BreadcrumbsTest(TestCase): | |
| def setUp(self): | |
| # instantiate the singleton | |
| self.breadcrumbs = Breadcrumbs() | |
| def tearDown(self): | |
| # drop the singleton | |
| self.breadcrumbs._drop_it() | |
| del self.breadcrumbs | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment