Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-CSVImport
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mike Gabriel
AlekSIS-App-CSVImport
Commits
abad7716
Verified
Commit
abad7716
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Reformat
parent
29121971
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/csv_import/tests/test_field_types.py
+14
-4
14 additions, 4 deletions
aleksis/apps/csv_import/tests/test_field_types.py
with
14 additions
and
4 deletions
aleksis/apps/csv_import/tests/test_field_types.py
+
14
−
4
View file @
abad7716
...
...
@@ -40,8 +40,12 @@ def test_converters_one():
verbose_name
=
"
Bar
"
,
)
field_0
=
template
.
fields
.
create
(
field_type
=
FirstNameFieldType
.
name
,
index
=
0
,
args
=
{
"
converter_pre
"
:
"
lstrip
"
})
field_1
=
template
.
fields
.
create
(
field_type
=
LastNameFieldType
.
name
,
index
=
1
,
args
=
{
"
converter_post
"
:
"
rstrip
"
})
field_0
=
template
.
fields
.
create
(
field_type
=
FirstNameFieldType
.
name
,
index
=
0
,
args
=
{
"
converter_pre
"
:
"
lstrip
"
}
)
field_1
=
template
.
fields
.
create
(
field_type
=
LastNameFieldType
.
name
,
index
=
1
,
args
=
{
"
converter_post
"
:
"
rstrip
"
}
)
field_0_cls
=
field_0
.
field_type_class
field_1_cls
=
field_1
.
field_type_class
...
...
@@ -64,8 +68,14 @@ def test_converters_multiple():
verbose_name
=
"
Bar
"
,
)
field_0
=
template
.
fields
.
create
(
field_type
=
FirstNameFieldType
.
name
,
index
=
0
,
args
=
{
"
converter_pre
"
:
[
"
lstrip
"
,
"
rstrip
"
]})
field_1
=
template
.
fields
.
create
(
field_type
=
LastNameFieldType
.
name
,
index
=
1
,
args
=
{
"
converter_pre
"
:
"
rstrip
"
,
"
converter_post
"
:
"
lstrip
"
})
field_0
=
template
.
fields
.
create
(
field_type
=
FirstNameFieldType
.
name
,
index
=
0
,
args
=
{
"
converter_pre
"
:
[
"
lstrip
"
,
"
rstrip
"
]}
)
field_1
=
template
.
fields
.
create
(
field_type
=
LastNameFieldType
.
name
,
index
=
1
,
args
=
{
"
converter_pre
"
:
"
rstrip
"
,
"
converter_post
"
:
"
lstrip
"
},
)
field_0_cls
=
field_0
.
field_type_class
field_1_cls
=
field_1
.
field_type_class
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment