def test_updates_changed_data(self, session, user, connection):
     change_column_name(connection, 'user', 'name', 'some_name')
     activity = last_activity(connection)
     assert activity['changed_data'] == {
         'id': user.id,
         'some_name': 'John',
         'age': 15
     }
 def test_updates_changed_data(self, session, user, connection):
     change_column_name(connection, 'user', 'name', 'some_name')
     activity = last_activity(connection)
     assert activity['changed_data'] == {
         'id': user.id,
         'some_name': 'John',
         'age': 15
     }
 def test_updates_old_data(self, session, user, connection):
     user.name = 'Luke'
     session.commit()
     change_column_name(connection, 'user', 'name', 'some_name')
     activity = last_activity(connection)
     assert activity['old_data'] == {
         'id': user.id,
         'some_name': 'John',
         'age': 15
     }
 def test_updates_old_data(self, session, user, connection):
     user.name = 'Luke'
     session.commit()
     change_column_name(connection, 'user', 'name', 'some_name')
     activity = last_activity(connection)
     assert activity['old_data'] == {
         'id': user.id,
         'some_name': 'John',
         'age': 15
     }
 def test_only_updates_given_table(
     self,
     session,
     article,
     user,
     connection
 ):
     change_column_name(connection, 'user', 'name', 'some_name')
     activity = session.query(versioning_manager.activity_cls).filter_by(
         table_name='article'
     ).one()
     assert 'name' in activity.changed_data
 def test_only_updates_given_table(
     self,
     session,
     article,
     user,
     connection,
     versioning_manager
 ):
     change_column_name(connection, 'user', 'name', 'some_name')
     activity = session.query(versioning_manager.activity_cls).filter_by(
         table_name='article'
     ).one()
     assert 'name' in activity.changed_data