~fginther/ubuntu-ci-services-itself/bsb-source-detail

« back to all changes in this revision

Viewing changes to ppa-assigner/ppa_assigner/tests.py

  • Committer: Chris Johnston
  • Author(s): Chris Johnston
  • Date: 2014-02-28 20:52:40 UTC
  • mfrom: (292.1.1 1286301)
  • Revision ID: chris_johnston-20140228205240-ze18s9gal1yzznik
[r=Chris Johnston, PS Jenkins bot, Andy Doan] Lets use our own ppa for required packages 1286301 from Chris Johnston

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
 
251
251
        # verify we make one _lp_post call
252
252
        get_publishing_history.return_value = [
253
 
            {'self_link': 'foo', 'date_made_pending': None},
254
 
            {'self_link': 'foo', 'date_made_pending': '123'},
 
253
            {'self_link': 'foo', 'date_removed': None},
 
254
            {'self_link': 'foo', 'date_removed': '123'},
255
255
        ]
256
256
        resp_200 = mock.Mock()
257
257
        resp_200.getcode.return_value = 200
281
281
 
282
282
        # first pass we still have an item, so the state shouldn't change
283
283
        get_publishing_history.return_value = [
284
 
            {'date_made_pending': None},
285
 
            {'date_made_pending': '123'},
 
284
            {'date_removed': None},
 
285
            {'date_removed': '123'},
286
286
        ]
287
287
        Command().cleaning_to_available()
288
288
        p = PPA.objects.get(name='ci_pool-002')
289
289
        self.assertEqual(PPA.CLEANING, p.state)
290
290
 
291
291
        get_publishing_history.return_value = [
292
 
            {'date_made_pending': '123'},
293
 
            {'date_made_pending': '123'},
 
292
            {'date_removed': '123'},
 
293
            {'date_removed': '123'},
294
294
        ]
295
295
        Command().cleaning_to_available()
296
296
        p = PPA.objects.get(name='ci_pool-002')