~ubuntu-branches/ubuntu/lucid/landscape-client/lucid

« back to all changes in this revision

Viewing changes to landscape/user/tests/test_provider.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2009-12-16 10:50:05 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20091216105005-bmki8i2of1dmcdkc
Tags: 1.4.0-0ubuntu0.9.10.0
* New upstream release (LP: #497351)

* Bug fixes:
  - Fix landscape daemons fail to start when too many groups are
    available (LP: #456124)
  - Fix landscape programs wake up far too much. (LP: #340843)
  - Fix Package manager fails with 'no such table: task' (LP #465846)
  - Fix test suite leaving temporary files around (LP #476418)
  - Fix the 1hr long wait for user data to be uploaded following a
    resynchronisation (LP #369000)

* Add support for Ubuntu release upgrades:
  - Add helper function to fetch many files at once (LP: #450629)
  - Handle release-upgrade messages in the packagemanager
    plugin (LP: #455217)
  - Add a release-upgrader task handler (LP: #462543)
  - Support upgrade-tool environment variables (LP: #463321)

* Add initial support for Smart package locking:
  - Detect and report changes about Smart package locks (#488108)

* Packaging fixes:
  - Turn unnecessary Pre-Depends on python-gobject into a regular Depends
  - If it's empty, remove /etc/landscape upon purge

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
from landscape.user.tests.helpers import FakeUserProvider
8
8
 
9
 
from landscape.tests.helpers import (
10
 
    LandscapeTest, MakePathHelper)
 
9
from landscape.tests.helpers import LandscapeTest
11
10
 
12
11
 
13
12
class ProviderTest(LandscapeTest):
14
13
 
15
 
    helpers = [MakePathHelper]
16
 
 
17
14
    def setUp(self):
18
15
        LandscapeTest.setUp(self)
19
 
        self.shadow_file = self.make_path("""\
 
16
        self.shadow_file = self.makeFile("""\
20
17
jdoe:$1$xFlQvTqe$cBtrNEDOIKMy/BuJoUdeG0:13348:0:99999:7:::
21
18
psmith:!:13348:0:99999:7:::
22
19
sbarnes:$1$q7sz09uw$q.A3526M/SHu8vUb.Jo1A/:13349:0:99999:7:::
23
20
""")
24
21
 
25
 
        self.passwd_file = self.make_path("""\
 
22
        self.passwd_file = self.makeFile("""\
26
23
root:x:0:0:root:/root:/bin/bash
27
24
haldaemon:x:107:116:Hardware abstraction layer,,,:/home/haldaemon:/bin/false
28
25
kevin:x:1001:65534:Kevin,101,+44123123,+44123124:/home/kevin:/bin/bash
29
26
""")
30
27
 
31
 
        self.group_file = self.make_path("""\
 
28
        self.group_file = self.makeFile("""\
32
29
root:x:0:
33
30
cdrom:x:24:haldaemon,kevin
34
31
kevin:x:1000:
405
402
        Incorrectly formatted lines according to passwd(5) should be ignored
406
403
        during processing.
407
404
        """
408
 
        passwd_file = self.make_path("""\
 
405
        passwd_file = self.makeFile("""\
409
406
root:x:0:0:root:/root:/bin/bash
410
407
broken
411
408
haldaemon:x:107:Hardware abstraction layer,,,:/home/haldaemon:/bin/false
449
446
        We should ignore the specific pattern for NIS user-extensions in passwd
450
447
        files.
451
448
        """
452
 
        passwd_file = self.make_path("""\
 
449
        passwd_file = self.makeFile("""\
453
450
root:x:0:0:root:/root:/bin/bash
454
451
kevin:x:1001:65534:Kevin,101,+44123123,+44123124:/home/kevin:/bin/bash
455
452
+jkakar::::::
487
484
        Incorrectly formatted lines according to group(5) should be ignored
488
485
        during processing.
489
486
        """
490
 
        group_file = self.make_path("""\
 
487
        group_file = self.makeFile("""\
491
488
root:x:0:
492
489
cdrom:x:24:
493
490
kevin:x:kevin:
509
506
        We should ignore the specific pattern for NIS user-extensions in group 
510
507
        files.
511
508
        """
512
 
        group_file = self.make_path("""\
 
509
        group_file = self.makeFile("""\
513
510
root:x:0:
514
511
cdrom:x:24:
515
512
+jkakar:::