Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
PRESUBMIT_test_mocks.MockChange Class Reference
Inheritance diagram for PRESUBMIT_test_mocks.MockChange:

Public Member Functions

def __init__ (self, changed_files)
 
def LocalPaths (self)
 
def AffectedFiles (self, include_dirs=False, include_deletes=True, file_filter=None)
 
def GitFootersFromDescription (self)
 

Public Attributes

 author_email
 
 footers
 

Detailed Description

Mock class for Change class.

This class can be used in presubmit unittests to mock the query of the
current change.

Definition at line 265 of file PRESUBMIT_test_mocks.py.

Constructor & Destructor Documentation

◆ __init__()

def PRESUBMIT_test_mocks.MockChange.__init__ (   self,
  changed_files 
)

Definition at line 272 of file PRESUBMIT_test_mocks.py.

272 def __init__(self, changed_files):
273 self._changed_files = changed_files
274 self.author_email = None
275 self.footers = defaultdict(list)
276

Member Function Documentation

◆ AffectedFiles()

def PRESUBMIT_test_mocks.MockChange.AffectedFiles (   self,
  include_dirs = False,
  include_deletes = True,
  file_filter = None 
)

Definition at line 280 of file PRESUBMIT_test_mocks.py.

281 file_filter=None):
282 return self._changed_files
283

◆ GitFootersFromDescription()

def PRESUBMIT_test_mocks.MockChange.GitFootersFromDescription (   self)

Definition at line 284 of file PRESUBMIT_test_mocks.py.

284 def GitFootersFromDescription(self):
285 return self.footers

◆ LocalPaths()

def PRESUBMIT_test_mocks.MockChange.LocalPaths (   self)

Definition at line 277 of file PRESUBMIT_test_mocks.py.

277 def LocalPaths(self):
278 return self._changed_files
279

Member Data Documentation

◆ author_email

PRESUBMIT_test_mocks.MockChange.author_email

Definition at line 274 of file PRESUBMIT_test_mocks.py.

◆ footers

PRESUBMIT_test_mocks.MockChange.footers

Definition at line 275 of file PRESUBMIT_test_mocks.py.


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