From 8490e8995947a31b00de6af39fabe00849fd5b91 Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Mon, 19 Feb 2018 08:01:20 +0100 Subject: [PATCH] [TYPO] --- golem_resource/tests/test_golem_resource.py | 10 +++++----- golem_resource/tests/test_golem_resource_timetable.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/golem_resource/tests/test_golem_resource.py b/golem_resource/tests/test_golem_resource.py index 903b83d..cd12140 100644 --- a/golem_resource/tests/test_golem_resource.py +++ b/golem_resource/tests/test_golem_resource.py @@ -33,11 +33,11 @@ class TestGolemResource(TransactionCase): 'avaibility_start': '2018-01-01', 'avaibility_stop': '2020-01-01' } - self.resource = self.env['golem.resource'] + self.resource_obj = self.env['golem.resource'] def test_resource_basic(self): """ Test resource bases """ - resource = self.resource.create(self.data) + resource = self.resource_obj.create(self.data) self.assertTrue(resource.active) self.assertFalse(resource.validation_required) self.assertEqual(resource.avaibility_start, '2018-01-01') @@ -49,7 +49,7 @@ class TestGolemResource(TransactionCase): def test_resource_active(self): """ Test resource active """ - resource = self.resource.create(self.data) + resource = self.resource_obj.create(self.data) self.assertTrue(resource.active) resource.active_toggle() self.assertFalse(resource.active) @@ -60,10 +60,10 @@ class TestGolemResource(TransactionCase): """ Test resource dates : stop can not be after start """ self.data.update({'avaibility_stop': '2017-01-01'}) with self.assertRaises(ValidationError): - self.resource.create(self.data) + self.resource_obj.create(self.data) def test_resource_dates_equal(self): """ Test resource dates : stop can not be equal to start """ self.data.update({'avaibility_stop': self.data['avaibility_start']}) with self.assertRaises(ValidationError): - self.resource.create(self.data) + self.resource_obj.create(self.data) diff --git a/golem_resource/tests/test_golem_resource_timetable.py b/golem_resource/tests/test_golem_resource_timetable.py index 3e396e7..52d644b 100644 --- a/golem_resource/tests/test_golem_resource_timetable.py +++ b/golem_resource/tests/test_golem_resource_timetable.py @@ -34,7 +34,7 @@ class TestGolemResourceTimetable(TransactionCase): 'avaibility_start': '2018-01-01', 'avaibility_stop': '2020-01-01' }) - self.timetable = self.env['golem.resource.timetable'] + self.timetable_obj = self.env['golem.resource.timetable'] self.data = {'resource_id': self.resource.id, 'weekday': '0', 'time_start': 8.0, @@ -42,7 +42,7 @@ class TestGolemResourceTimetable(TransactionCase): def test_timetable_basic(self): """ Test Timetable bases """ - timetable = self.timetable.create(self.data) + timetable = self.timetable_obj.create(self.data) self.assertEqual(timetable.resource_id, self.resource) self.assertEqual(timetable.time_start, 8.0) self.assertEqual(timetable.time_stop, 10.0) @@ -52,7 +52,7 @@ class TestGolemResourceTimetable(TransactionCase): """ Test timetable times : stop can not be equal or after start """ self.data.update({'time_stop': 7.0}) with self.assertRaises(ValidationError): - self.timetable.create(self.data) + self.timetable_obj.create(self.data) self.data.update({'time_stop': self.data['time_start']}) with self.assertRaises(ValidationError): - self.timetable.create(self.data) + self.timetable_obj.create(self.data)