~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to tests/test_package-data-downloader.py

  • Committer: Gianfranco Costamagna
  • Date: 2019-07-29 15:02:10 UTC
  • Revision ID: costamagnagianfranco@yahoo.it-20190729150210-7a4b9qrm8kgnexv8
Fix E117 over-indented pep issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        stampfile = os.path.join(package_data_downloader.STAMPDIR,
124
124
                                 hookfile)
125
125
        with open(stampfile, "w"):
126
 
                pass
 
126
            pass
127
127
        orig_stamp_time = os.stat(stampfile).st_mtime
128
128
        package_data_downloader.process_download_requests()
129
129
        new_stamp_time = os.stat(stampfile).st_mtime
141
141
        stampfile = os.path.join(package_data_downloader.STAMPDIR,
142
142
                                 hookfile)
143
143
        with open(stampfile, "w"):
144
 
                pass
 
144
            pass
145
145
        orig_stamp_date = os.stat(stampfile).st_mtime
146
146
        time.sleep(0.01)
147
147
        # create the hook file
190
190
        stampfile = os.path.join(package_data_downloader.STAMPDIR,
191
191
                                 hookfile)
192
192
        with open(stampfile, "w"):
193
 
                pass
 
193
            pass
194
194
        time.sleep(0.01)
195
195
        # create the hook file
196
196
        self._setup_hook_file(hookfile, "/bin/false")
206
206
        stampfile = os.path.join(package_data_downloader.STAMPDIR,
207
207
                                 hookfile)
208
208
        with open(stampfile, "w"):
209
 
                pass
 
209
            pass
210
210
        time.sleep(0.01)
211
211
        self._setup_hook_file(hookfile)
212
212
        # create an empty notifier file
221
221
        stampfile = os.path.join(package_data_downloader.STAMPDIR,
222
222
                                 hookfile)
223
223
        with open(stampfile, "w"):
224
 
                pass
 
224
            pass
225
225
        time.sleep(0.01)
226
226
        self._setup_hook_file(hookfile)
227
227
        # create empty notifier files
240
240
        stampfile = os.path.join(package_data_downloader.STAMPDIR,
241
241
                                 hookfile)
242
242
        with open(stampfile, "w"):
243
 
                pass
 
243
            pass
244
244
        time.sleep(0.01)
245
245
        self._setup_hook_file(hookfile)
246
246
        # create an empty permanent notifier file
256
256
        stampfile = os.path.join(package_data_downloader.STAMPDIR,
257
257
                                 hookfile)
258
258
        with open(stampfile, "w"):
259
 
                pass
 
259
            pass
260
260
        time.sleep(0.01)
261
261
        # overwrite canary file to create a failure
262
262
        self.canary_file = "not-there.txt"