old_contents: import pytest
  import linkatos.parser as parser
  
  
  def test_capture_reaction():
      message = {
          'reaction': '+1',
          'channel': 'example_channel',
          'item': {
              'channel': 'example_channel',
              'ts': 1234.1234
          },
          'user': 'example_user',
          'item_user': 'example_item_user'
      }
  
      reaction= {
          'message': '+1',
          'channel': 'example_channel',
          'item_ts': 1234.1234,
          'type': 'reaction',
          'user': 'example_user',
          'item_user': 'example_item_user'
      }
  
      assert parser.capture_reaction(message) == reaction
  
  
  def test_capture_url():
      message = {
          'channel': 'example_channel',
          'ts': 1234.1234,
          'user': 'example_user',
      }
  
      url = 'http://foo.bar'
  
      parsed_url = {
          'message': 'http://foo.bar',
          'channel': 'example_channel',
          'ts': 1234.1234,
          'type': 'url',
          'user': 'example_user',
      }
  
      assert parser.capture_url(message, url) == parsed_url
  
new_contents: import pytest
  import linkatos.parser as parser
  
  
  def test_parse_reaction_added():
      event = {
          'reaction': '+1',
          'channel': 'example_channel',
          'item': {
              'channel': 'example_channel',
              'ts': 1234.1234
          },
          'user': 'example_user',
          'item_user': 'example_item_user'
      }
      reaction= {
          'reaction': '+1',
          'channel': 'example_channel',
          'to_id': 1234.1234,
          'type': 'reaction',
          'user': 'example_user',
          'to_user': 'example_item_user'
      }
      assert parser.parse_reaction_added(event) == reaction
  
  
  def test_parse_url():
      event = {
          'text': '<http://foo.bar>',
          'channel': 'example_channel',
          'ts': 1234.1234,
          'user': 'example_user'
      }
      parsed_url = {
          'url': 'http://foo.bar',
          'channel': 'example_channel',
          'id': 1234.1234,
          'type': 'url',
          'user': 'example_user'
      }
      assert parser.parse_url_message(event) == parsed_url
  
  
  def test_empty_message():
      event = {
          'text': 'not a url',
          'channel': 'example_channel',
          'ts': 1234.1234,
          'user': 'example_user'
      }
      empty_url_message = {
              'url': None,
              'channel': None,
              'id': None,
              'type': None,
              'user': None
      }
      assert parser.parse_url_message(event) == empty_url_message
  
subject: Add parser tests