'Tests marking migrations as applied/unapplied.'

def test_apply(self):

    recorder = MigrationRecorder(connection)
    self.assertEqual({(x, y) for (x, y) in recorder.applied_migrations() if (x == 'myapp')}, set())
    recorder.record_applied('myapp', '0432_ponies')
    self.assertEqual({(x, y) for (x, y) in recorder.applied_migrations() if (x == 'myapp')}, {('myapp', '0432_ponies')})
    recorder_other = MigrationRecorder(connections['other'])
    self.assertEqual({(x, y) for (x, y) in recorder_other.applied_migrations() if (x == 'myapp')}, set())
    recorder.record_unapplied('myapp', '0432_ponies')
    self.assertEqual({(x, y) for (x, y) in recorder.applied_migrations() if (x == 'myapp')}, set())
