new_contents: import uuid
  
  from ..oauth2 import _serialize_state, _deserialize_state
  
  def test_serialize_state():
      state1 = {
          'state_id': uuid.uuid4().hex,
          'next': 'url',
      }
      b64_state = _serialize_state(state1)
      assert isinstance(b64_state, str)
      state2 = _deserialize_state(b64_state)
      assert state2 == state1
  
subject: test state serialization