'Verify refreshing an object updates stored json data.'

def test_refresh_json(self):

    expected_data = {'changed_files': 4}
    response = requests.Response()
    response.status_code = 200
    response.raw = io.BytesIO(json.dumps(expected_data).encode('utf8'))
    self.session.get.return_value = response
    self.instance.refresh()
    assert ('changed_files' in self.instance.as_dict())
    assert (self.instance.changed_files == 4)
