mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-16 01:11:49 +02:00
Compare commits
5 commits
162fb27816
...
5d82a31e0a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5d82a31e0a | ||
4f9cad88bd | |||
![]() |
72bc34e4af | ||
![]() |
f9e1e9241c | ||
![]() |
12c77b4850 |
4 changed files with 9 additions and 9 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -2,9 +2,9 @@ name: CI
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'stable-*' ]
|
||||
branches: [ 'main', 'stable-*' ]
|
||||
pull_request:
|
||||
branches: [ 'master', 'stable-*' ]
|
||||
branches: [ 'main', 'stable-*' ]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
|
4
.github/workflows/dockerhub.yml
vendored
4
.github/workflows/dockerhub.yml
vendored
|
@ -3,9 +3,9 @@ name: Docker build
|
|||
on:
|
||||
push:
|
||||
tags: ['*']
|
||||
branches: [ 'master', 'stable-*' ]
|
||||
branches: [ 'main', 'stable-*' ]
|
||||
pull_request:
|
||||
branches: [ 'master', 'stable-*' ]
|
||||
branches: [ 'main', 'stable-*' ]
|
||||
|
||||
|
||||
jobs:
|
||||
|
|
|
@ -442,7 +442,7 @@ class TestExport(IhatemoneyTestCase):
|
|||
'2016-12-31,red wine,Expense,XXX,200.0,jeanne,1.0,"zorglub, tata"',
|
||||
'2016-12-31,à raclette,Expense,10.0,XXX,zorglub,2.0,"zorglub, jeanne, tata, pépé"',
|
||||
]
|
||||
received_lines = resp.data.decode("utf-8").split("\n")
|
||||
received_lines = resp.data.decode("utf-8-sig").split("\n")
|
||||
|
||||
for i, line in enumerate(expected):
|
||||
assert set(line.split(",")) == set(received_lines[i].strip("\r").split(","))
|
||||
|
@ -476,7 +476,7 @@ class TestExport(IhatemoneyTestCase):
|
|||
"55.34,XXX,jeanne,tata",
|
||||
"127.33,XXX,jeanne,zorglub",
|
||||
]
|
||||
received_lines = resp.data.decode("utf-8").split("\n")
|
||||
received_lines = resp.data.decode("utf-8-sig").split("\n")
|
||||
|
||||
for i, line in enumerate(expected):
|
||||
assert set(line.split(",")) == set(received_lines[i].strip("\r").split(","))
|
||||
|
@ -682,7 +682,7 @@ class TestExport(IhatemoneyTestCase):
|
|||
"date,what,bill_type,amount,currency,payer_name,payer_weight,owers",
|
||||
"2016-12-31,'=COS(36),Expense,10.0,EUR,zorglub,1.0,zorglub",
|
||||
]
|
||||
received_lines = resp.data.decode("utf-8").split("\n")
|
||||
received_lines = resp.data.decode("utf-8-sig").split("\n")
|
||||
|
||||
for i, line in enumerate(expected):
|
||||
assert set(line.split(",")) == set(received_lines[i].strip("\r").split(","))
|
||||
|
|
|
@ -194,7 +194,7 @@ def list_of_dicts2csv(dict_to_convert):
|
|||
writer = csv.writer(csv_file)
|
||||
writer.writerows(csv_data)
|
||||
csv_file.seek(0)
|
||||
csv_file = BytesIO(csv_file.getvalue().encode("utf-8"))
|
||||
csv_file = BytesIO(csv_file.getvalue().encode("utf-8-sig"))
|
||||
return csv_file
|
||||
|
||||
|
||||
|
@ -202,7 +202,7 @@ def csv2list_of_dicts(csv_to_convert):
|
|||
"""Take a csv in-memory file and turns it into
|
||||
a list of dictionnaries
|
||||
"""
|
||||
csv_file = TextIOWrapper(csv_to_convert, encoding="utf-8")
|
||||
csv_file = TextIOWrapper(csv_to_convert, encoding="utf-8-sig")
|
||||
reader = csv.DictReader(csv_file)
|
||||
result = []
|
||||
for r in reader:
|
||||
|
|
Loading…
Reference in a new issue