Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.db import connection
- from django.test import TestCase
- from ..behaviors import WalletIntegration
- class TestModel(WalletIntegration):
- class Meta:
- app_label = 'test'
- class WalletTestCase(TestCase):
- def setUp(self):
- with connection.schema_editor() as schema_editor:
- schema_editor.create_model(TestModel)
- def test_wallet_id(self):
- model = TestModel.objects.create()
- self.assertIsNone(model.wallet_id)
- def test_wallet_property(self):
- model = TestModel.objects.create()
- self.assertTrue(hasattr(model, 'wallet'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement