# Path: PyChat/command.py
# SERVER_PREFIX = 's$' 
# CLIENT_PREFIX = 'c$'
# SEPARATOR = '~'
# def validate(line, prefix=''):
# def parse(line, prefix='', sep=SEPARATOR):
# def extractFirst(line, sep=SEPARATOR):
# def addFirst(line, add, sep=SEPARATOR):
# def cmd(command, value, prefix='', sep=SEPARATOR):
# def servercmd(command, value):
# def clientcmd(command, value, name=''):


import unittest
from PyChat import command as cmd
#!/usr/bin/env python2

##
# PyChat
# https://github.com/leosartaj/PyChat.git
#
# Copyright (c) 2014 Sartaj Singh
# Licensed under the MIT license.
##


class Testvalidate(unittest.TestCase):
    """
    tests the validate function in command module
    """
    def setUp(self):
        self.prefix = 'c$'

    def test_correct_string(self):
        dummy = self.prefix + '~dummy'

# Path: PyChat/command.py
# SERVER_PREFIX = 's$' 
# CLIENT_PREFIX = 'c$'
# SEPARATOR = '~'
# def validate(line, prefix=''):
# def parse(line, prefix='', sep=SEPARATOR):
# def extractFirst(line, sep=SEPARATOR):
# def addFirst(line, add, sep=SEPARATOR):
# def cmd(command, value, prefix='', sep=SEPARATOR):
# def servercmd(command, value):
# def clientcmd(command, value, name=''):


# Path: PyChat/tests/test_command/test_validate.py
import unittest
from PyChat import command as cmd

#!/usr/bin/env python2

##
# PyChat
# https://github.com/leosartaj/PyChat.git
#
# Copyright (c) 2014 Sartaj Singh
# Licensed under the MIT license.
##


class Testvalidate(unittest.TestCase):
    """
    tests the validate function in command module
    """
    def setUp(self):
        self.prefix = 'c$'

    def test_correct_string(self):
        dummy = self.prefix + '~dummy'

        self.assertTrue(cmd.validate(dummy, self.prefix))