[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] 3 commits: dbtest_archive.py: use `assertEqual` instead of deprecated `assertEquals`



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

3 changed files:

Changes:

  • tests/db_test.py
    ... ... @@ -90,7 +90,7 @@ class DBDakTestCase(DakTestCase):
    90 90
                 if not self.arch[arch_string]:
    
    91 91
                     self.arch[arch_string] = Architecture(arch_string)
    
    92 92
                 if arch_string != 'kfreebsd-i386':
    
    93
    -                self.arch[arch_string].suites = self.suite.values()
    
    93
    +                self.arch[arch_string].suites = list(self.suite.values())
    
    94 94
                 else:
    
    95 95
                     filtered = list(self.suite.values())
    
    96 96
                     if 'lenny' in self.suite:
    

  • tests/dbtest_archive.py
    ... ... @@ -70,7 +70,7 @@ class ArchiveTestCase(DBDakTestCase):
    70 70
             with self.attempt_upload(changes) as attempt:
    
    71 71
                 result = attempt.check()
    
    72 72
                 self.assertFalse(result)
    
    73
    -            self.assertEquals(attempt.reject_reasons,
    
    73
    +            self.assertEqual(attempt.reject_reasons,
    
    74 74
                                   [u'.changes signed by unknown key.'])
    
    75 75
     
    
    76 76
             # Import the keyring
    
    ... ... @@ -80,7 +80,7 @@ class ArchiveTestCase(DBDakTestCase):
    80 80
             with self.attempt_upload(changes) as attempt:
    
    81 81
                 result = attempt.check()
    
    82 82
                 self.assertFalse(result)
    
    83
    -            self.assertEquals(attempt.reject_reasons,
    
    83
    +            self.assertEqual(attempt.reject_reasons,
    
    84 84
                                   [u'No target suite found. Please check your target distribution and that you uploaded to the right archive.'])
    
    85 85
     
    
    86 86
             # Add the missing suite
    
    ... ... @@ -91,7 +91,7 @@ class ArchiveTestCase(DBDakTestCase):
    91 91
             with self.attempt_upload(changes) as attempt:
    
    92 92
                 result = attempt.check()
    
    93 93
                 self.assertFalse(result)
    
    94
    -            self.assertEquals(attempt.reject_reasons,
    
    94
    +            self.assertEqual(attempt.reject_reasons,
    
    95 95
                                   [u'source format 3.0 (quilt) is not allowed in suite unstable'])
    
    96 96
     
    
    97 97
             # Add the missing format
    
    ... ... @@ -101,7 +101,7 @@ class ArchiveTestCase(DBDakTestCase):
    101 101
             with self.attempt_upload(changes) as attempt:
    
    102 102
                 result = attempt.check()
    
    103 103
                 self.assertFalse(result)
    
    104
    -            self.assertEquals(attempt.reject_reasons,
    
    104
    +            self.assertEqual(attempt.reject_reasons,
    
    105 105
                                   [u'Architecture source is not allowed in suite unstable'])
    
    106 106
     
    
    107 107
             # Add the missing architecture / suites connection
    
    ... ... @@ -113,7 +113,7 @@ class ArchiveTestCase(DBDakTestCase):
    113 113
                 result = attempt.check()
    
    114 114
                 self.assertTrue(result)
    
    115 115
                 self.assertTrue(attempt.new)
    
    116
    -            self.assertEquals(attempt.reject_reasons, [])
    
    116
    +            self.assertEqual(attempt.reject_reasons, [])
    
    117 117
     
    
    118 118
         def test_upload_new(self):
    
    119 119
             # Parse the changes file
    
    ... ... @@ -137,7 +137,7 @@ class ArchiveTestCase(DBDakTestCase):
    137 137
                 result = attempt.check()
    
    138 138
                 self.assertTrue(result)
    
    139 139
                 self.assertTrue(attempt.new)
    
    140
    -            self.assertEquals(attempt.reject_reasons, [])
    
    140
    +            self.assertEqual(attempt.reject_reasons, [])
    
    141 141
     
    
    142 142
             # Add the override for the source package
    
    143 143
             override = {}
    
    ... ... @@ -155,7 +155,7 @@ class ArchiveTestCase(DBDakTestCase):
    155 155
                 result = attempt.check()
    
    156 156
                 self.assertTrue(result)
    
    157 157
                 self.assertTrue(attempt.new)
    
    158
    -            self.assertEquals(attempt.reject_reasons, [])
    
    158
    +            self.assertEqual(attempt.reject_reasons, [])
    
    159 159
     
    
    160 160
             # Add the binary overrides
    
    161 161
             overrides = []
    
    ... ... @@ -175,7 +175,7 @@ class ArchiveTestCase(DBDakTestCase):
    175 175
                 result = attempt.check()
    
    176 176
                 self.assertTrue(result)
    
    177 177
                 self.assertFalse(attempt.new)
    
    178
    -            self.assertEquals(attempt.reject_reasons, [])
    
    178
    +            self.assertEqual(attempt.reject_reasons, [])
    
    179 179
     
    
    180 180
         def classes_to_clean(self):
    
    181 181
             for object_ in self.session.query(dbconn.Override):
    

  • tests/dbtest_session.py
    ... ... @@ -171,7 +171,7 @@ class SessionTestCase(DBDakTestCase):
    171 171
             self.assertEqual(uid1.uid, uid3.uid)
    
    172 172
             self.assertTrue(uid3 in new_session)
    
    173 173
             # test for ressource leaks with mass cloning
    
    174
    -        for _ in xrange(1, 1000):
    
    174
    +        for _ in range(1, 1000):
    
    175 175
                 uid1.clone()
    
    176 176
     
    
    177 177
         def classes_to_clean(self):
    


  • Reply to: