Skip to content

Commit 8f96ab3

Browse files
committed
[FIX] account_payment_method_fs_storage: improve test by removing usage of datas
1 parent 00a34b9 commit 8f96ab3

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

account_payment_method_fs_storage/tests/test_account_payment_method_fs_storage.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,22 @@ def setUpClass(cls):
1818
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
1919
cls.company = cls.company_data["company"]
2020

21-
cls.fs_storage = cls.env.ref("fs_storage.default_fs_storage")
21+
cls.fs_storage = cls.env["fs.storage"].create(
22+
{
23+
"name": "Odoo Filesystem Backend",
24+
"protocol": "odoofs",
25+
"code": "odoofs",
26+
}
27+
)
2228

2329
cls.fs_storage.write(
2430
{
2531
"use_on_payment_method": True,
2632
}
2733
)
28-
cls.payment_method = cls.env.ref(
29-
"account.account_payment_method_manual_out"
30-
).copy(
34+
cls.payment_method = cls.env["account.payment.method"].create(
3135
{
36+
"payment_type": "outbound",
3237
"storage": str(cls.fs_storage.id),
3338
"name": "method test",
3439
"code": "test",

0 commit comments

Comments
 (0)