~ubuntu-branches/ubuntu/trusty/python-axiom/trusty

« back to all changes in this revision

Viewing changes to axiom/test/historic/test_scheduler1to2.py

  • Committer: Bazaar Package Importer
  • Author(s): Debian Python Modules Team, Sandro Tosi, Vincent Bernat
  • Date: 2010-01-13 20:38:50 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100113203850-v552yecly7l65dtd
Tags: 0.6.0-1
[ Sandro Tosi ]
* debian/rules
  - don't FTBFS when removing not-existing dirs; thanks to Lucas Nussbaum for
    the report; Closes: #560565

[ Vincent Bernat ]
* New upstream release.
* debian/control
  - don't use obsolete "<" for Conflicts field; use "<<" instead. Closes: #557926.
  - bump Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
"""
 
3
Tests for the upgrade of Scheduler from version 1 to version 2, in which it was
 
4
largely supplanted by L{_SiteScheduler}.
 
5
"""
 
6
 
 
7
from axiom.iaxiom import IScheduler
 
8
from axiom.scheduler import Scheduler, _SiteScheduler
 
9
from axiom.test.historic.stubloader import StubbedTest
 
10
 
 
11
 
 
12
class SchedulerUpgradeTests(StubbedTest):
 
13
    def test_powerdown(self):
 
14
        """
 
15
        The L{Scheduler} created by the stub is powered down by the upgrade and
 
16
        adapting the L{Store} to L{IScheduler} succeeds with an instance of
 
17
        L{_SiteScheduler}.
 
18
        """
 
19
        scheduler = self.store.findUnique(Scheduler)
 
20
        self.assertEquals(list(self.store.interfacesFor(scheduler)), [])
 
21
        self.assertIsInstance(IScheduler(self.store), _SiteScheduler)