~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archivepublisher/tests/test_config.py

[rs=buildbot-poller] automatic merge from stable. Revisions: 13823
        included.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2011 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
"""Test publisher configs handling."""
 
5
 
 
6
__metaclass__ = type
 
7
 
 
8
from canonical.testing.layers import ZopelessDatabaseLayer
 
9
from lp.archivepublisher.config import getPubConfig
 
10
from lp.testing import TestCaseWithFactory
 
11
 
 
12
 
 
13
class TestGetPubConfig(TestCaseWithFactory):
 
14
 
 
15
    layer = ZopelessDatabaseLayer
 
16
 
 
17
    def test_getPubConfig_returns_None_if_no_publisherconfig_found(self):
 
18
        archive = self.factory.makeDistribution(no_pubconf=True).main_archive
 
19
        self.assertEqual(None, getPubConfig(archive))