Skip to content

Commit

Permalink
Merge branch 'testing/unit-test-prefix' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sirosen committed Jul 27, 2014
2 parents 9936ee2 + f7ac2b2 commit 4022b1a
Show file tree
Hide file tree
Showing 22 changed files with 152 additions and 152 deletions.
2 changes: 1 addition & 1 deletion tests/unit/block/block_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@istest
def block_is_abstract():
"""
Block Base Class Is Abstract
Unit: Block Base Class Is Abstract
Ensures that a Block cannot be instantiated.
"""
ensure_except(TypeError, salve.block.base.Block)
24 changes: 12 additions & 12 deletions tests/unit/block/directory_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@istest
def dir_create_compile():
"""
Directory Block Create Compile
Unit: Directory Block Create Compile
Verifies the result of converting a Dir Block to an Action.
"""
b = salve.block.directory_block.DirBlock(dummy_file_context)
Expand Down Expand Up @@ -48,7 +48,7 @@ def dir_create_compile():
@istest
def dir_create_compile_chmod():
"""
Directory Block Create Compile With Chmod
Unit: Directory Block Create Compile With Chmod
Verifies the result of converting a Dir Block to an Action when the
Block's mode is set.
"""
Expand Down Expand Up @@ -83,7 +83,7 @@ def dir_create_compile_chmod():
@istest
def dir_create_chown_as_root():
"""
Directory Block Create Compile With Chown
Unit: Directory Block Create Compile With Chown
Verifies the result of converting a Dir Block to an Action when the
user is root and the Block's user and group are set.
"""
Expand Down Expand Up @@ -113,7 +113,7 @@ def dir_create_chown_as_root():
@istest
def empty_dir_copy_compile():
"""
Directory Block Copy Compile (Empty Dir)
Unit: Directory Block Copy Compile (Empty Dir)
Verifies the result of converting a Dir Block to an Action.
"""
b = salve.block.directory_block.DirBlock(dummy_file_context)
Expand All @@ -136,7 +136,7 @@ def empty_dir_copy_compile():
@istest
def dir_copy_chown_as_root():
"""
Directory Block Copy Compile (As Root)
Unit: Directory Block Copy Compile (As Root)
Verifies the result of converting a Dir Block to an Action.
"""
b = salve.block.directory_block.DirBlock(dummy_file_context)
Expand Down Expand Up @@ -168,7 +168,7 @@ def dir_copy_chown_as_root():
@istest
def dir_copy_fails_nosource():
"""
Directory Block Copy Fails Without Source
Unit: Directory Block Copy Fails Without Source
Verifies that converting a Dir Block to an Action raises a
BlockException.
"""
Expand All @@ -186,7 +186,7 @@ def dir_copy_fails_nosource():
@istest
def dir_copy_fails_notarget():
"""
Directory Block Copy Compilation Fails Without Target
Unit: Directory Block Copy Compilation Fails Without Target
Verifies that converting a Dir Block to an Action raises a
BlockException.
"""
Expand All @@ -204,7 +204,7 @@ def dir_copy_fails_notarget():
@istest
def dir_create_fails_notarget():
"""
Directory Block Create Compilation Fails Without Target
Unit: Directory Block Create Compilation Fails Without Target
Verifies that converting a Dir Block to an Action raises a
BlockException.
"""
Expand All @@ -221,7 +221,7 @@ def dir_create_fails_notarget():
@istest
def dir_path_expand():
"""
Directory Block Path Expand
Unit: Directory Block Path Expand
Verifies the results of path expansion in a Dir block.
"""
b = salve.block.directory_block.DirBlock(dummy_file_context)
Expand All @@ -238,7 +238,7 @@ def dir_path_expand():
@istest
def dir_path_expand_fail_notarget():
"""
Directory Block Path Expand Fails Without Target
Unit: Directory Block Path Expand Fails Without Target
Verifies that path expansion fails when there is no "target"
attribute.
"""
Expand All @@ -254,7 +254,7 @@ def dir_path_expand_fail_notarget():
@istest
def dir_compile_fail_noaction():
"""
Directory Block Compilation Fails Without Action
Unit: Directory Block Compilation Fails Without Action
Verifies that block to action conversion fails when there is no
"action" attribute.
"""
Expand All @@ -272,7 +272,7 @@ def dir_compile_fail_noaction():
@istest
def dir_compile_fail_unknown_action():
"""
Directory Block Compilation Fails Unknown Action
Unit: Directory Block Compilation Fails Unknown Action
Verifies that block to action conversion fails when the "action"
attribute has an unrecognized value.
"""
Expand Down
26 changes: 13 additions & 13 deletions tests/unit/block/file_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@istest
def file_copy_compile():
"""
File Block Copy Compile
Unit: File Block Copy Compile
Verifies the result of converting a file copy block to an action.
"""
b = salve.block.file_block.FileBlock(dummy_file_context)
Expand Down Expand Up @@ -69,7 +69,7 @@ def file_copy_compile():
@istest
def file_create_compile():
"""
File Block Create Compile
Unit: File Block Create Compile
Verifies the result of converting a file create block to an action.
"""
b = salve.block.file_block.FileBlock(dummy_file_context)
Expand Down Expand Up @@ -112,7 +112,7 @@ def file_create_compile():
@istest
def file_copy_nouser():
"""
File Block Copy Without User Skips Chown
Unit: File Block Copy Without User Skips Chown
Verifies that converting a file copy block to an action when the
user attribute is unset skips the chown subaction, even as root.
"""
Expand Down Expand Up @@ -149,7 +149,7 @@ def file_copy_nouser():
@istest
def file_create_nouser():
"""
File Block Create Without User Skips Chown
Unit: File Block Create Without User Skips Chown
Verifies that converting a file create block to an action when the
user attribute is unset leaves out the chown.
"""
Expand Down Expand Up @@ -180,7 +180,7 @@ def file_create_nouser():
@istest
def file_copy_nogroup():
"""
File Block Copy Without Group Skips Chown
Unit: File Block Copy Without Group Skips Chown
Verifies that converting a file copy block to an action when the
group attribute is unset raises a BlockException.
"""
Expand Down Expand Up @@ -219,7 +219,7 @@ def file_copy_nogroup():
@istest
def file_create_nogroup():
"""
File Block Create Without Group Skips Chown
Unit: File Block Create Without Group Skips Chown
Verifies that converting a file create block to an action when the
group attribute is unset raises a BlockException.
"""
Expand Down Expand Up @@ -250,7 +250,7 @@ def file_create_nogroup():
@istest
def file_copy_nomode():
"""
File Block Copy Without Mode Skips Chmod
Unit: File Block Copy Without Mode Skips Chmod
Verifies that converting a file copy block to an action when the
mode attribute is unset raises a BlockException.
"""
Expand Down Expand Up @@ -290,7 +290,7 @@ def file_copy_nomode():
@istest
def file_create_nomode():
"""
File Block Create Without Mode Skips Chmod
Unit: File Block Create Without Mode Skips Chmod
Verifies that converting a file create block to an action when the
mode attribute is unset raises a BlockException.
"""
Expand Down Expand Up @@ -322,7 +322,7 @@ def file_create_nomode():
@istest
def file_copy_fails_nosource():
"""
File Block Copy Fails Without Source
Unit: File Block Copy Fails Without Source
Verifies that converting a file copy block to an action when the
source attribute is unset raises a BlockException.
"""
Expand All @@ -340,7 +340,7 @@ def file_copy_fails_nosource():
@istest
def file_copy_fails_notarget():
"""
File Block Copy Compilation Fails Without Target
Unit: File Block Copy Compilation Fails Without Target
Verifies that converting a file copy block to an action when the
target attribute is unset raises a BlockException.
"""
Expand All @@ -358,7 +358,7 @@ def file_copy_fails_notarget():
@istest
def file_create_fails_notarget():
"""
File Block Create Compilation Fails Without Target
Unit: File Block Create Compilation Fails Without Target
Verifies that converting a file create block to an action when the
target attribute is unset raises a BlockException.
"""
Expand All @@ -376,7 +376,7 @@ def file_create_fails_notarget():
@istest
def file_path_expand():
"""
File Block Path Expand
Unit: File Block Path Expand
Tests the results of expanding relative paths in a File block.
"""
b = salve.block.file_block.FileBlock(dummy_file_context)
Expand All @@ -393,7 +393,7 @@ def file_path_expand():
@istest
def file_path_expand_fail_notarget():
"""
File Block Path Expand Fails Without Target
Unit: File Block Path Expand Fails Without Target
Verifies that a File Block with the target attribute unset raises
a BlockException when paths are expanded.
"""
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/block/identifier_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@istest
def invalid_block_id1():
"""
Block Identifier Invalid Identifier Fails (1)
Unit: Block Identifier Invalid Identifier Fails (1)
Checks that an invalid block identifier fails, even when it is of
type IDENTIFIER.
"""
Expand All @@ -35,7 +35,7 @@ def invalid_block_id1():
@istest
def invalid_block_id2():
"""
Block Identifier Invalid Identifier Fails (2)
Unit: Block Identifier Invalid Identifier Fails (2)
Checks that an invalid block identifier with a non-IDENTIFIER type
fails block creation.
"""
Expand All @@ -51,7 +51,7 @@ def invalid_block_id2():
@istest
def valid_file_id():
"""
Block Identifier File Identifier To Block
Unit: Block Identifier File Identifier To Block
Checks that an identifier 'file' creates a file block.
"""
file_id = Token('file', Token.types.IDENTIFIER, dummy_file_context)
Expand All @@ -63,7 +63,7 @@ def valid_file_id():
@istest
def valid_manifest_id():
"""
Block Identifier Manifest Identifier To Block
Unit: Block Identifier Manifest Identifier To Block
Checks that an identifier 'manifest' creates a manifest block.
"""
manifest_id = Token('manifest', Token.types.IDENTIFIER, dummy_file_context)
Expand All @@ -76,7 +76,7 @@ def valid_manifest_id():
@istest
def valid_directory_id():
"""
Block Identifier Directory Identifier To Block
Unit: Block Identifier Directory Identifier To Block
Checks that an identifier 'directory' creates a directory block.
"""
manifest_id = Token('directory', Token.types.IDENTIFIER,
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/block/manifest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@istest
def sourceless_manifest_compile_error():
"""
Manifest Compilation Fails Without Action
Unit: Manifest Compilation Fails Without Action
Verifies that a Manifest block raises a BlockException when
compiled if the action attribute is unspecified.
"""
Expand All @@ -32,7 +32,7 @@ def sourceless_manifest_compile_error():
@istest
def sourceless_manifest_expand_error():
"""
Manifest Block Path Expand Fails Without Source
Unit: Manifest Block Path Expand Fails Without Source
Verifies that a Manifest block raises a BlockException when paths
are expanded if the source attribute is unspecified.
"""
Expand All @@ -47,7 +47,7 @@ def sourceless_manifest_expand_error():
@istest
def empty_manifest_expand():
"""
Manifest Block SubBlock Expand Empty List
Unit: Manifest Block SubBlock Expand Empty List
Verifies that a Manifest block with no sub-blocks expands without
errors.
"""
Expand All @@ -61,7 +61,7 @@ def empty_manifest_expand():
@istest
def recursive_manifest_error():
"""
Manifest Block Self-Inclusion Error
Unit: Manifest Block Self-Inclusion Error
Verifies that a Manifest block which includes itself raises a
BlockException when expanded.
"""
Expand All @@ -77,7 +77,7 @@ def recursive_manifest_error():
@istest
def sub_block_expand():
"""
Manifest Block SubBlock Expand
Unit: Manifest Block SubBlock Expand
Verifies that Manifest block expansion works normally.
"""
with mock.patch('salve.logger', dummy_logger):
Expand All @@ -98,7 +98,7 @@ def sub_block_expand():
@istest
def sub_block_compile():
"""
Manifest Block SubBlock Compile
Unit: Manifest Block SubBlock Compile
Verifies that Manifest block expansion followed by action
conversion works normally.
"""
Expand Down
Loading

0 comments on commit 4022b1a

Please sign in to comment.