~alecu/ubuntuone-client/ignore-in-close-write-in-dirs

« back to all changes in this revision

Viewing changes to tests/platform/os_helper/test_windows.py

- No longer check whether or not we are actually running as administrator on Windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
import os
33
33
import shutil
34
34
import sys
35
 
import platform
36
35
 
37
36
from twisted.internet import defer
38
37
from twisted.trial.unittest import TestCase
482
481
 
483
482
 
484
483
class TestIsRoot(TestCase):
485
 
 
486
484
    """Tests for the is_root function."""
487
485
 
488
 
    def test_isanadmin_called(self):
489
 
        """Test that shell.IsUserAnAdmin is called."""
490
 
        expected = object()
491
 
        self.patch(os_helper.shell, 'IsUserAnAdmin', lambda: expected)
492
 
        actual = os_helper.is_root()
493
 
        self.assertEqual(expected, actual)
494
 
 
495
 
    def test_is_root_on_xp(self):
496
 
        """Test that os_helper.is_root always returns False on XP"""
 
486
    def test_is_root(self):
 
487
        """Test that os_helper.is_root always returns False"""
497
488
        expected = False
498
 
        self.patch(platform, "version", "5.1.2600")
499
489
        actual = os_helper.is_root()
500
490
        self.assertEqual(expected, actual)