def test_convert_columns_to_json(mocker):
    test_schema = '\n        {\n      "namespace": "TimeControl",\n      "type": "object",\n      "name": "languages",\n      "country_code": "USA",\n      "data_sink": {"type":"snowflake", "database": "HRIS_DATA", \n      "table_name": "LANGUAGES", "schema": "TIMECONTROL"},\n      "data_source": {"type": "api", "base_url": \n      "https://smiledirectclub.timecontrol.net/api/v1"},\n      "fields": [\n        {"name":"_METADATA","type":{"type":"string","logical_type":"json"}},\n        {"name":"KEY","type":{"type":"int"},"sf_merge_key": true},\n        {"name":"NAME","type":{"type":"string"}},\n        {"name":"DESCRIPTION","type":{"type":"string"}},\n        {"name":"CULTURE","type":{"type":"string"}}\n      ]\n    }'
    test_data = '\n      [{"_metadata": {"links": [{"id": "9",\n          "rel": "self",\n          "href": "/api/v1/languages/9",\n          "code": "Ceština"}]},\n       "Key": 9,\n       "Name": "Ceština",\n       "Description": "Czech",\n       "Culture": "cs"},\n       {"_metadata": {"links": [{"id": "10",\n          "rel": "self",\n          "href": "/api/v1/languages/10",\n          "code": "This"}]},\n       "Key": 9,\n       "Name": "This",\n       "Description": "Is",\n       "Culture": "ze"}]\n          '
    df = Dataframe(SDCDFTypes.PANDAS, test_schema)
    df.load_data(json.loads(test_data))
    data_before = df.df['_METADATA'][0]
    df.convert_columns_to_json()
    data_after = df.df['_METADATA'][0]
    pytest.assume((data_before == "{'links': [{'id': '9', 'rel': 'self', 'href': '/api/v1/languages/9', 'code': 'Ceština'}]}"))
    pytest.assume((data_after == '{"links": [{"id": "9", "rel": "self", "href": "/api/v1/languages/9", "code": "Ce\\u0161tina"}]}'))
def test_convert_columns_to_json(mocker):
    test_schema = '\n        {\n      "namespace": "TimeControl",\n      "type": "object",\n      "name": "languages",\n      "country_code": "USA",\n      "data_sink": {"type":"snowflake", "database": "HRIS_DATA", \n      "table_name": "LANGUAGES", "schema": "TIMECONTROL"},\n      "data_source": {"type": "api", "base_url": \n      "https://smiledirectclub.timecontrol.net/api/v1"},\n      "fields": [\n        {"name":"_METADATA","type":{"type":"string","logical_type":"json"}},\n        {"name":"KEY","type":{"type":"int"},"sf_merge_key": true},\n        {"name":"NAME","type":{"type":"string"}},\n        {"name":"DESCRIPTION","type":{"type":"string"}},\n        {"name":"CULTURE","type":{"type":"string"}}\n      ]\n    }'
    test_data = '\n      [{"_metadata": {"links": [{"id": "9",\n          "rel": "self",\n          "href": "/api/v1/languages/9",\n          "code": "Ceština"}]},\n       "Key": 9,\n       "Name": "Ceština",\n       "Description": "Czech",\n       "Culture": "cs"},\n       {"_metadata": {"links": [{"id": "10",\n          "rel": "self",\n          "href": "/api/v1/languages/10",\n          "code": "This"}]},\n       "Key": 9,\n       "Name": "This",\n       "Description": "Is",\n       "Culture": "ze"}]\n          '
    df = Dataframe(SDCDFTypes.PANDAS, test_schema)
    df.load_data(json.loads(test_data))
    data_before = df.df['_METADATA'][0]
    df.convert_columns_to_json()
    data_after = df.df['_METADATA'][0]
    pytest.assume((data_before == "{'links': [{'id': '9', 'rel': 'self', 'href': '/api/v1/languages/9', 'code': 'Ceština'}]}"))
    pytest.assume((data_after == '{"links": [{"id": "9", "rel": "self", "href": "/api/v1/languages/9", "code": "Ce\\u0161tina"}]}'))