~nataliabidart/ubuntuone-client/stable-3-0-update-2.99.91.1

« back to all changes in this revision

Viewing changes to tests/platform/windows/test_os_helper.py

  • Committer: Natalia B. Bidart
  • Date: 2012-03-27 15:41:57 UTC
  • mfrom: (1159.1.58 ubuntuone-client)
  • Revision ID: natalia.bidart@canonical.com-20120327154157-np77rwn8oowq71r2
- Updating from trunk up to revno 1217.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import os
21
21
import shutil
22
22
import sys
 
23
import platform
23
24
 
24
25
from twisted.internet import defer
25
26
from twisted.trial.unittest import TestCase
478
479
        self.patch(os_helper.shell, 'IsUserAnAdmin', lambda: expected)
479
480
        actual = os_helper.is_root()
480
481
        self.assertEqual(expected, actual)
 
482
 
 
483
    def test_is_root_on_xp(self):
 
484
        """Test that os_helper.is_root always returns False on XP"""
 
485
        expected = False
 
486
        self.patch(platform, "version", "5.1.2600")
 
487
        actual = os_helper.is_root()
 
488
        self.assertEqual(expected, actual)