Replace depreciated assert_ function with assertTrue

issue9077
review274891002
This commit is contained in:
David Harper committed 2020-02-21 09:15:12 +01:00
1 parent 62ffa46867
commit f0990baa49
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ To use it in your own module you just have to inherit from
@with_transaction()
def test_method(self):
"Test method"
self.assert_(True)
self.assertTrue(True)
Tests from this modules are found by the function
+1 -1
View File
@@ -82,7 +82,7 @@ class FieldDateTestCase(unittest.TestCase):
date, = Date.create([{'date': CurrentDate()}])
self.assert_(date.date)
self.assertTrue(date.date)
@with_transaction()
def test_create_non_date(self):
+1 -1
View File
@@ -85,7 +85,7 @@ class FieldDateTimeTestCase(unittest.TestCase):
'datetime': DateTime.datetime.sql_cast(CurrentTimestamp()),
}])
self.assert_(datetime.datetime)
self.assertTrue(datetime.datetime)
@with_transaction()
def test_create_non_datetime(self):
+1 -1
View File
@@ -83,7 +83,7 @@ class FieldTimeTestCase(unittest.TestCase):
time, = Time.create([{'time': Time.time.sql_cast(CurrentTimestamp())}])
self.assert_(time.time)
self.assertTrue(time.time)
@with_transaction()
def test_create_non_time(self):