Exemple #1
0
def test_custom_fields_csv_generation():
    project = f.ProjectFactory.create(epics_csv_uuid=uuid.uuid4().hex)
    attr = f.EpicCustomAttributeFactory.create(project=project, name="attr1", description="desc")
    epic = f.EpicFactory.create(project=project)
    attr_values = epic.custom_attributes_values
    attr_values.attributes_values = {str(attr.id):"val1"}
    attr_values.save()
    queryset = project.epics.all()
    data = services.epics_to_csv(project, queryset)
    data.seek(0)
    reader = csv.reader(data)
    row = next(reader)
    assert row[18] == attr.name
    row = next(reader)
    assert row[18] == "val1"
Exemple #2
0
def test_custom_fields_csv_generation():
    project = f.ProjectFactory.create(epics_csv_uuid=uuid.uuid4().hex)
    attr = f.EpicCustomAttributeFactory.create(project=project, name="attr1", description="desc")
    epic = f.EpicFactory.create(project=project)
    attr_values = epic.custom_attributes_values
    attr_values.attributes_values = {str(attr.id):"val1"}
    attr_values.save()
    queryset = project.epics.all()
    data = services.epics_to_csv(project, queryset)
    data.seek(0)
    reader = csv.reader(data)
    row = next(reader)
    assert row[18] == attr.name
    row = next(reader)
    assert row[18] == "val1"