oslotest.createfile
Module¶oslotest.createfile.
CreateFileWithContent
(filename, contents, ext='.conf', encoding='utf-8')¶Bases: fixtures.fixture.Fixture
Create a temporary file with the given content.
Creates a file using a predictable name, to be used by tests for code that need a filename to load data or otherwise interact with the real filesystem.
Warning
It is the responsibility of the caller to ensure that the file is removed.
Users of this fixture may also want to use
fixtures.NestedTempfile
to set the temporary directory
somewhere safe and to ensure the files are cleaned up.
path
¶The canonical name of the file created.
Parameters: |
|
---|
setUp
()¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.