Skip to content

[IMP] base/tests: remove company_name field #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/base/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2351,8 +2351,8 @@ def test_assert_updated(self):

# when ids has multiple records, all records should be updated
with self.assertUpdated("res_partner", ids=[p1.id, p2.id]):
p1.company_name = "Survey Corps"
p2.company_name = "Survey Corps"
p1.city = "Survey Corps"
p2.city = "Survey Corps"
util.flush(p1)
util.flush(p2)
with self.assertRaises(AssertionError), self.assertUpdated("res_partner", ids=[p1.id, p2.id]):
Expand Down Expand Up @@ -2388,12 +2388,12 @@ def test_assert_not_updated(self):

# when ids has a record, only that record should not be updated
with self.assertNotUpdated("res_partner", ids=[p2.id]):
p1.company_name = "Survey Corps"
p1.city = "Survey Corps"
util.flush(p1)

# when ids has multiple records, none of them should be updated
with self.assertRaises(AssertionError), self.assertNotUpdated("res_partner", ids=[p1.id, p2.id]):
p2.company_name = "Survey Corps"
p2.city = "Survey Corps"
util.flush(p2)

def test_assert_updated_combo(self):
Expand All @@ -2403,7 +2403,7 @@ def test_assert_updated_combo(self):
util.flush(p2)

with self.assertUpdated("res_partner", ids=[p1.id]), self.assertNotUpdated("res_partner", ids=[p2.id]):
p1.company_name = "Marley Warriors"
p1.city = "Marley Warriors"
util.flush(p1)

with self.assertRaises(AssertionError), self.assertUpdated("res_partner"), self.assertNotUpdated(
Expand Down