diff --git a/tests/db/test_changes.py b/tests/db/test_changes.py index 0cf413aa820d94741e2040b3729d2dd5abeddd29..dab033e37b7aa27901978e655b105bf8570af5a1 100644 --- a/tests/db/test_changes.py +++ b/tests/db/test_changes.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from unittest import TestCase from mock import patch, DEFAULT, Mock, MagicMock, call @@ -9,24 +10,6 @@ from rattail.db import model from sqlalchemy.orm import RelationshipProperty -class TestChanges(TestCase): - - @patch.multiple('rattail.db.changes', listen=DEFAULT, ChangeRecorder=DEFAULT) - def test_record_changes(self, listen, ChangeRecorder): - session = Mock() - ChangeRecorder.return_value = 'whatever' - - changes.record_changes(session) - ChangeRecorder.assert_called_once_with(True) - listen.assert_called_once_with(session, 'before_flush', 'whatever') - - ChangeRecorder.reset_mock() - listen.reset_mock() - changes.record_changes(session, ignore_role_changes=False) - ChangeRecorder.assert_called_once_with(False) - listen.assert_called_once_with(session, 'before_flush', 'whatever') - - class TestChangeRecorder(TestCase): def test_init(self):