---
  test_name: Hivemind bridge_api.normalize_post patterns test

  marks:
    - patterntest # TODO: multistage test since condenser_api.get_content is the source of parameter for the main call
                  # pattern made with "post" param made by fat node (since it was what was expected in parameter and crashed when it was taken from hivemind)
                  # now the result is basically the same as get_post
                  # also due to how tavern tries to substitute {tags} with value, but it has no such value, which generates error
                  # original content of json_metadata: "{\"tags\":[\"witness-category\"],\"links\":[\"https://steemit.com/introduceyourself/@gtg/hello-world\"]}"

  includes:
    - !include ../../common.yaml

  stages:
    - name: normalize_post
      request:
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "bridge.normalize_post"
          params: {"post":{
  "active_votes": [
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 7498426175709,
      "voter": "steempty"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 42312727614219,
      "voter": "blocktrades"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 305178325808,
      "voter": "justin"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 869557685770,
      "voter": "silver"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 5114872713665,
      "voter": "roadscape"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 2289539684123,
      "voter": "complexring"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 2180802207,
      "voter": "chloe"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 2185117237,
      "voter": "jen"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 14176153154,
      "voter": "danknugs"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 198373663832,
      "voter": "steemservices"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 30116948361,
      "voter": "aizensou"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 46091054,
      "voter": "kelly"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 6428425796,
      "voter": "bentley"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 91926650,
      "voter": "gandalf"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 345893040115,
      "voter": "boatymcboatface"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 27177508174,
      "voter": "proctologic"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 316897956,
      "voter": "sophia"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 21914098976,
      "voter": "hcf27"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 7368210672,
      "voter": "modeprator"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 103782757471,
      "voter": "edgeland"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 785540122070,
      "voter": "steemship"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 5786912627,
      "voter": "spaninv"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 196850398821,
      "voter": "pal"
    },
    {
      "percent": "3301",
      "reputation": 0,
      "rshares": 2792608078,
      "voter": "murh"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 98699236,
      "voter": "itay"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 9975325205,
      "voter": "johnerfx"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 206512826638,
      "voter": "taoteh1221"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 57136530202,
      "voter": "juanmiguelsalas"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 9128119179,
      "voter": "somedude"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 203906072916,
      "voter": "kaylinart"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 867610016,
      "voter": "johnerminer"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 32485842972,
      "voter": "geoffrey"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 2480411371,
      "voter": "gary-smith"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 23267718250,
      "voter": "jparty"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 1953019618,
      "voter": "mammasitta"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 25911121779,
      "voter": "gtg"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 4679981480,
      "voter": "madwallace"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 39716978937,
      "voter": "lauralemons"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 461256359,
      "voter": "chamviet"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 15413814887,
      "voter": "r4fken"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 6283643209,
      "voter": "endaksi1"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 16250564070,
      "voter": "picokernel"
    },
    {
      "percent": "100",
      "reputation": 0,
      "rshares": 702264837,
      "voter": "furion"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 80421874395,
      "voter": "anyx"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 2241994263,
      "voter": "egjoshslim"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 120632910259,
      "voter": "paco"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 6621475753,
      "voter": "senseiteekay"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 226092177,
      "voter": "jesse5th"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 23810445079,
      "voter": "inertia"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 210829632,
      "voter": "glassice"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 203070157,
      "voter": "lenar79"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 15277675835,
      "voter": "arcurus"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 101769596658,
      "voter": "johnsmith"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 330264489,
      "voter": "steeminer"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 55123516,
      "voter": "cire81"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 20346345482,
      "voter": "celebr1ty"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 116522786,
      "voter": "kibela"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 4195953733,
      "voter": "sulev"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 1863529002,
      "voter": "glitterpig"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 88147854,
      "voter": "alrx6918"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 156246825,
      "voter": "vitz81"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 7842906910,
      "voter": "rawnetics"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 2110595726,
      "voter": "naturalista"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 47302483,
      "voter": "persianqueen"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 309993436467,
      "voter": "glitterfart"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 102759457,
      "voter": "caitlinm"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 71928410,
      "voter": "jellenmark"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 151302584,
      "voter": "agussudaryanto"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 12663424,
      "voter": "ciao"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 519527818,
      "voter": "iaco"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 14786662,
      "voter": "steemo"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 1568749518,
      "voter": "nixonnox"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 3195610059,
      "voter": "hanshotfirst"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 2458086,
      "voter": "steema"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 12950553,
      "voter": "confucius"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 911816960,
      "voter": "bledarus"
    },
    {
      "percent": "10",
      "reputation": 0,
      "rshares": 1251336,
      "voter": "softpunk"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 3742919,
      "voter": "jarvis"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 37069491,
      "voter": "thecurator"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 229846452,
      "voter": "mefisto"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 104558988,
      "voter": "cinderphoenix"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 98540677,
      "voter": "steeminion"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 57959648,
      "voter": "piezolit"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 8108416,
      "voter": "brucy"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 35603456,
      "voter": "shukerona"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 56023735,
      "voter": "leticiapink"
    },
    {
      "percent": "10000",
      "reputation": 0,
      "rshares": 295195987,
      "voter": "steeminnow"
    }
  ],
  "author": "gtg",
  "author_reputation": 0,
  "beneficiaries": [],
  "body": "Hello, World!\n\nMy intention is not to make it into top 19. I could name many  other candidates (clearly more than 19) with greater commitment to steem(it) who are a lot more appropriate as witnesses, but I'm sure I can be useful as a backup witness.\n\nI introduced myself here:\nhttps://steemit.com/introduceyourself/@gtg/hello-world\nThose of you who use https://steemit.chat know me as **Gandalf**.\nFor some time, I\u2019ve been using my magic powers (mostly those related to security and infrastructure) to improve steemit. For example, I\u2019ve improved our \"Perfect\" Forward Secrecy and made our communication with site more secure.\n\nMy **seed node** (EU based):\n`seed-node = gtg.steem.house:2001`\nYou can also use it to rsync data dir\n`rsync -Pa rsync://gtg.steem.house/witness_node_data_dir .`\n\nMy **witness node** is on a separate data center (an EU-based one as well).\nIf you believe I can be of value to steemit, please vote for me:\n`vote_for_witness YOURACCOUNT gtg true true`\n\n![witness](https://grey.house/img/witness.jpg)",
  "body_length": 1023,
  "cashout_time": "1969-12-31T23:59:59",
  "category": "witness-category",
  "children": 7,
  "created": "2016-08-05T14:02:24",
  "curator_payout_value": "231.879 HBD",
  "depth": 0,
  "json_metadata": "",
  "last_payout": "2016-09-05T05:17:57",
  "last_update": "2016-08-05T14:02:24",
  "max_accepted_payout": "1000000.000 HBD",
  "net_rshares": 61504610477823,
  "parent_author": "",
  "parent_permlink": "witness-category",
  "pending_payout_value": "0.000 HBD",
  "percent_hbd": 10000,
  "permlink": "witness-gtg",
  "post_id": 624896,
  "promoted": "0.000 HBD",
  "replies": [],
  "root_title": "Witness \"gtg\"",
  "title": "Witness \"gtg\"",
  "total_payout_value": "703.088 HBD",
  "url": "/witness-category/@gtg/witness-gtg"
}
}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "gtg"
            directory: "bridge_api_patterns/normalize_post"
