# Path: anchorhub/exceptions/validationexception.py
# class ValidationException(Exception):
#     def __init__(self, *args, **kwargs):
#         Exception.__init__(self, *args, **kwargs)


from nose.tools import *
from anchorhub.exceptions.validationexception import ValidationException
import anchorhub.validation.validate_wrapper as v
Tests validation functions in validate_wrappers.py

http://www.github.com/samjabrahams/anchorhub/validation/validate_wrappers.py
"""



class WrapSpace(object):
    """
    Simple class to test out namespace implementations of validate_extensions()
    """
    def __init__(self, w=None):
        if w is not None:
            self.wrapper = w


def test_validate_correct():
    """
    validate_wrapper.py: Test validate() on correct wrapper strings
    """
    a = "{ }"
    assert v.validate(a)

    b = "[-->       <--]"
    assert v.validate(b)

    c = "$$$$ $$$$"
    assert v.validate(c)



# Path: anchorhub/exceptions/validationexception.py
# class ValidationException(Exception):
#     def __init__(self, *args, **kwargs):
#         Exception.__init__(self, *args, **kwargs)


# Path: anchorhub/validation/tests/test_validate_wrapper.py
from nose.tools import *
from anchorhub.exceptions.validationexception import ValidationException
import anchorhub.validation.validate_wrapper as v

Tests validation functions in validate_wrappers.py

http://www.github.com/samjabrahams/anchorhub/validation/validate_wrappers.py
"""



class WrapSpace(object):
    """
    Simple class to test out namespace implementations of validate_extensions()
    """
    def __init__(self, w=None):
        if w is not None:
            self.wrapper = w


def test_validate_correct():
    """
    validate_wrapper.py: Test validate() on correct wrapper strings
    """
    a = "{ }"
    assert v.validate(a)

    b = "[-->       <--]"
    assert v.validate(b)

    c = "$$$$ $$$$"
    assert v.validate(c)



@raises(ValidationException)