From bc770c4ac64e4ebf020fab64c1bc5e6d733a86e0 Mon Sep 17 00:00:00 2001 From: Jakub Judiny <judiny@cesnet.cz> Date: Thu, 20 Apr 2023 14:26:52 +0200 Subject: [PATCH] Fix detector test (Redmine issue: #7632) --- lib/mentat/datatype/test_sqldb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mentat/datatype/test_sqldb.py b/lib/mentat/datatype/test_sqldb.py index fe5c55f1..90f46d05 100644 --- a/lib/mentat/datatype/test_sqldb.py +++ b/lib/mentat/datatype/test_sqldb.py @@ -653,13 +653,13 @@ class TestMentatDatatypeSqldb(unittest.TestCase): # Query for a specific detector and return exactly one object. result = self.session.query(DetectorModel).filter(DetectorModel.name == 'DETECTOR 1').one() - self.assertEqual(repr(result), "<Detector(id='1',name='DETECTOR 1')>") + self.assertEqual(repr(result), "<Detector(name='DETECTOR 1')>") self.assertEqual(result.__class__.__name__, 'DetectorModel') self.assertTrue(result.to_dict()) # Query for a specific detector and return exactly one object. result = self.session.query(DetectorModel).filter(DetectorModel.name == 'DETECTOR 2').first() - self.assertEqual(repr(result), "<Detector(id='2',name='DETECTOR 2')>") + self.assertEqual(repr(result), "<Detector(name='DETECTOR 2')>") self.assertTrue(result.to_dict()) # Attempt to access each attribute in the detector object. @@ -679,7 +679,7 @@ class TestMentatDatatypeSqldb(unittest.TestCase): result = self.session.query(DetectorModel).filter(DetectorModel.name == 'DETECTOR 2').first() self.assertEqual(result, None) result = self.session.query(DetectorModel).filter(DetectorModel.name == 'DETECTOR 2 changed').first() - self.assertEqual(repr(result), "<Detector(id='2',name='DETECTOR 2 changed')>") + self.assertEqual(repr(result), "<Detector(name='DETECTOR 2 changed')>") result_json_b = result.to_json() self.assertTrue(jsondiff(result_json_a, result_json_b)) -- GitLab