* Some tests might be considered destructive, such as adding or removing users from the system. This change allows those tests to be skipped unless stated otherwise.
```python
from saltunittest import destructiveTest
class ATestCase(TestCase):
@destructiveTest
def test_some_destructive_code(self):
"""Some destructive code."""
```
On the console we get something like:
```
test_destructive (unit.config_test.ConfigTestCase) ... skipped 'Destructive tests are disabled'
```
This is just a simple logging handler which will keep all emitted log messages in a list. This can be used to test if a certain log messages is emitted in a certain scenario. Usage example:
```python
with TestsLoggingHandler() as handler:
# (...) Do what ever you wish here
handler.messages # here are the emitted log messages
```
Integration tests requiring a salt master and daemon were seperated
from pure unit tests. For now both are run with runtest.py. In
the future it could take arguments for which type of tests to run.
After a great deal of thought, I feel that the only way to reliably run
a test suite it to start a minion and master, and condition the data to
reflect the literal returns (take out the transport overhead).
This commit is the initial push towards this method of unit testing,
these test will be able to acctually test every aspect of salt.
This allows for tests to be written without too much change from the
normal unittest workflow. Now they should use the 'saltunittest'
namespace and we will need to import anything we need from the original
'unittest' or 'unittest2' namespace.