From 6bc231fd1e329fac6f0d03618ae8a9cff5032cb0 Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 16 Jan 2018 19:23:33 +0100 Subject: [PATCH] [TMP] Test if date_start date_end is required and vice-versa --- golem_season/tests/test_golem_season.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/golem_season/tests/test_golem_season.py b/golem_season/tests/test_golem_season.py index 59e93c3..6d60925 100644 --- a/golem_season/tests/test_golem_season.py +++ b/golem_season/tests/test_golem_season.py @@ -55,6 +55,17 @@ class TestGolemSeason(TransactionCase): 'date_start': '2009-11-01', 'date_end': '2011-12-31'}) + with self.assertRaises(ValidationError): + self.season_model.create({'name': 'date_end is nul', + 'date_start': '2009-11-01', + 'date_end': False}) + + with self.assertRaises(ValidationError): + self.season_model.create({'name': 'date_start is nul', + 'date_start' : False, + 'date_end': '2009-11-01'}) + + def test__onchange_season_dates(self): """ Test if membership date """ membership = self.env['product.template'].create({'name': 'Name',