def test_output_for_display_values(paragraphs_for_display_one_object, key, idx,
                                   substring):
    out = paragraphs_for_display_one_object.format_single_para_display()
    assert isinstance(out, dict)
    test_string = out[key] if idx == 'top' else out['paragraphs'][0][key]
    helper.assert_in_string(test_string, substring)
def test_write_one_standalone_para_sql(db_para_retriever, substring):
    fullstring = db_para_retriever.write_one_standalone_para_sql()
    helper.assert_in_string(fullstring, substring)
def test_db_output_list_data_values_correct(retriever_db_output, outer, idx,
                                            inner, substring):
    helper.assert_in_string(retriever_db_output[outer][idx][inner], substring)
def test_write_group_para_sql(db_para_retriever, substring):
    fullstring = db_para_retriever.write_group_para_sql('group_id')
    helper.assert_in_string(fullstring, substring)
def test_db_output_list_first_data_value_correct(retriever_db_output, outer,
                                                 key, substring):
    helper.assert_in_string(retriever_db_output[outer][key][0], substring)
def test_filename_creation_pass_in_filename():
    filepath = json_methods.create_json_file_path(filename=constants.FILENAME)
    print(filepath)
    helper.assert_in_string(filepath, constants.FILENAME)
def test_file_creation_prefix():
    filepath = json_methods.create_json_file_path(prefix=constants.FILE_PREFIX)
    print(filepath)
    helper.assert_in_string(filepath, constants.FILE_PREFIX)
def test_default_file_creation(substring):
    filepath = json_methods.create_json_file_path()
    print(filepath)
    helper.assert_in_string(filepath, substring)