Back to index

obnam  1.1
Public Member Functions | Public Attributes
obnamlib.metadata_tests.FakeFS Class Reference

List of all members.

Public Member Functions

def __init__
def lstat
def readlink
def getpwuid
def getgrgid
def fail_getpwuid
def fail_getgrgid
def llistxattr

Public Attributes

 st_atime_sec
 st_atime_nsec
 st_blocks
 st_dev
 st_gid
 st_ino
 st_mode
 st_mtime_sec
 st_mtime_nsec
 st_nlink
 st_size
 st_uid
 groupname
 username
 target

Detailed Description

Definition at line 25 of file metadata_tests.py.


Constructor & Destructor Documentation

Definition at line 27 of file metadata_tests.py.

00027 
00028     def __init__(self):
00029         self.st_atime_sec = 1
00030         self.st_atime_nsec = 11
00031         self.st_blocks = 2
00032         self.st_dev = 3
00033         self.st_gid = 4
00034         self.st_ino = 5
00035         self.st_mode = 6
00036         self.st_mtime_sec = 7
00037         self.st_mtime_nsec = 71
00038         self.st_nlink = 8
00039         self.st_size = 9
00040         self.st_uid = 10
00041         self.groupname = 'group'
00042         self.username = 'user'
00043         self.target = 'target'


Member Function Documentation

Definition at line 60 of file metadata_tests.py.

00060 
00061     def fail_getgrgid(self, gid):
00062         raise KeyError(gid)

Definition at line 57 of file metadata_tests.py.

00057 
00058     def fail_getpwuid(self, uid):
00059         raise KeyError(uid)
    
def obnamlib.metadata_tests.FakeFS.getgrgid (   self,
  gid 
)

Definition at line 54 of file metadata_tests.py.

00054 
00055     def getgrgid(self, gid):
00056         return (self.groupname, None, self.st_gid, None)

def obnamlib.metadata_tests.FakeFS.getpwuid (   self,
  uid 
)

Definition at line 50 of file metadata_tests.py.

00050 
00051     def getpwuid(self, uid):
00052         return (self.username, None, self.st_uid, self.st_gid, 
00053                 None, None, None)
    
def obnamlib.metadata_tests.FakeFS.llistxattr (   self,
  filename 
)

Definition at line 63 of file metadata_tests.py.

00063 
00064     def llistxattr(self, filename):
00065         return []
00066 

def obnamlib.metadata_tests.FakeFS.lstat (   self,
  filename 
)

Definition at line 44 of file metadata_tests.py.

00044 
00045     def lstat(self, filename):
00046         return self

Here is the caller graph for this function:

def obnamlib.metadata_tests.FakeFS.readlink (   self,
  filename 
)

Definition at line 47 of file metadata_tests.py.

00047 
00048     def readlink(self, filename):
00049         return 'target'


Member Data Documentation

Definition at line 40 of file metadata_tests.py.

Definition at line 29 of file metadata_tests.py.

Definition at line 28 of file metadata_tests.py.

Definition at line 30 of file metadata_tests.py.

Definition at line 31 of file metadata_tests.py.

Definition at line 32 of file metadata_tests.py.

Definition at line 33 of file metadata_tests.py.

Definition at line 34 of file metadata_tests.py.

Definition at line 36 of file metadata_tests.py.

Definition at line 35 of file metadata_tests.py.

Definition at line 37 of file metadata_tests.py.

Definition at line 38 of file metadata_tests.py.

Definition at line 39 of file metadata_tests.py.

Definition at line 42 of file metadata_tests.py.

Definition at line 41 of file metadata_tests.py.


The documentation for this class was generated from the following file: