# Path: hypebot/commands/bash_commands.py
# _RESERVED_ALIAS_KEYWORDS = ['list', 'remove', 'copy', 'clone']
# class AliasAddCommand(command_lib.BaseCommand):
# class AliasCloneCommand(command_lib.BaseCommand):
# class AliasRemoveCommand(command_lib.BaseCommand):
# class AliasListCommand(command_lib.BaseCommand):
# class EchoCommand(command_lib.BaseCommand):
# class GrepCommand(command_lib.BaseCommand):
# class SubCommand(command_lib.BaseCommand):
# class WordCountCommand(command_lib.BaseCommand):
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               add_prefix: Text,
#               alias_name: Text,
#               alias_cmd: Text) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               alias_name: Text,
#               target_user: user_pb2.User) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               alias_name: Text) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               target_user: user_pb2.User) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               string: Text) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               multi_word: Text,
#               single_word: Text,
#               message: Text) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               multi_word_search: Text,
#               single_word_search: Text,
#               multi_word_replace: Text,
#               single_word_replace: Text,
#               options: Text,
#               message: Text) -> hype_types.CommandResponse:
#   def __init__(self, *args):
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               unused_user: user_pb2.User,
#               options: Text,
#               message: Text) -> hype_types.CommandResponse:
# 
# Path: hypebot/commands/hypetest.py
# TEST_CHANNEL = channel_pb2.Channel(
#     id='#test', name='Test', visibility=channel_pb2.Channel.PUBLIC)
# TEST_USER = user_pb2.User(user_id='_test', display_name='user')
#   BOT_PARAMS = params_lib.MergeParams(basebot.BaseBot.DEFAULT_PARAMS, {
#       'interface': {
#           'type': 'CaptureInterface',
#       },
#       'proxy': {
#           # Tests are often run in an environment with no external access, so we
#           # provide a fake Proxy.
#           'type': 'EmptyProxy',
#       },
#       'storage': {
#           'type': 'MemStore',
#           'cached_type': 'MemStore',
#       },
#       'execution_mode': {
#           # This currently sets the command prefix to `!`. We should figure out
#           # a better long-term solution for the command prefix though since this
#           # can in theory change other behavior within core, but currently
#           # should have no other impacts.
#           'dev': False,
#       },
#       'commands': {},
#       'subscriptions': {},
#   })
# def ForCommand(command_cls):
#   def _Internal(test_cls):
#   def setUpClass(cls):
#   def setUp(self):
# class BaseCommandTestCase(unittest.TestCase):


import unittest
from hypebot.commands import bash_commands
from hypebot.commands import hypetest
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for bash_commands."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals




@hypetest.ForCommand(bash_commands.AliasAddCommand)
class AliasCommandsTest(hypetest.BaseCommandTestCase):

  def testAddAlias(self):
    response = self.command.Handle(hypetest.TEST_CHANNEL, hypetest.TEST_USER,
                                   '!alias add new original')
    self.assertEqual('Added alias new.', response)

    response = self.command.Handle(hypetest.TEST_CHANNEL, hypetest.TEST_USER,
                                   '!alias add new old')
    self.assertEqual('Updated alias new.', response)


@hypetest.ForCommand(bash_commands.EchoCommand)

# Path: hypebot/commands/bash_commands.py
# _RESERVED_ALIAS_KEYWORDS = ['list', 'remove', 'copy', 'clone']
# class AliasAddCommand(command_lib.BaseCommand):
# class AliasCloneCommand(command_lib.BaseCommand):
# class AliasRemoveCommand(command_lib.BaseCommand):
# class AliasListCommand(command_lib.BaseCommand):
# class EchoCommand(command_lib.BaseCommand):
# class GrepCommand(command_lib.BaseCommand):
# class SubCommand(command_lib.BaseCommand):
# class WordCountCommand(command_lib.BaseCommand):
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               add_prefix: Text,
#               alias_name: Text,
#               alias_cmd: Text) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               alias_name: Text,
#               target_user: user_pb2.User) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               alias_name: Text) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               target_user: user_pb2.User) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               string: Text) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               multi_word: Text,
#               single_word: Text,
#               message: Text) -> hype_types.CommandResponse:
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               user: user_pb2.User,
#               multi_word_search: Text,
#               single_word_search: Text,
#               multi_word_replace: Text,
#               single_word_replace: Text,
#               options: Text,
#               message: Text) -> hype_types.CommandResponse:
#   def __init__(self, *args):
#   def _Handle(self,
#               channel: channel_pb2.Channel,
#               unused_user: user_pb2.User,
#               options: Text,
#               message: Text) -> hype_types.CommandResponse:
# 
# Path: hypebot/commands/hypetest.py
# TEST_CHANNEL = channel_pb2.Channel(
#     id='#test', name='Test', visibility=channel_pb2.Channel.PUBLIC)
# TEST_USER = user_pb2.User(user_id='_test', display_name='user')
#   BOT_PARAMS = params_lib.MergeParams(basebot.BaseBot.DEFAULT_PARAMS, {
#       'interface': {
#           'type': 'CaptureInterface',
#       },
#       'proxy': {
#           # Tests are often run in an environment with no external access, so we
#           # provide a fake Proxy.
#           'type': 'EmptyProxy',
#       },
#       'storage': {
#           'type': 'MemStore',
#           'cached_type': 'MemStore',
#       },
#       'execution_mode': {
#           # This currently sets the command prefix to `!`. We should figure out
#           # a better long-term solution for the command prefix though since this
#           # can in theory change other behavior within core, but currently
#           # should have no other impacts.
#           'dev': False,
#       },
#       'commands': {},
#       'subscriptions': {},
#   })
# def ForCommand(command_cls):
#   def _Internal(test_cls):
#   def setUpClass(cls):
#   def setUp(self):
# class BaseCommandTestCase(unittest.TestCase):


# Path: hypebot/commands/bash_commands_test.py
import unittest
from hypebot.commands import bash_commands
from hypebot.commands import hypetest

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for bash_commands."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals




@hypetest.ForCommand(bash_commands.AliasAddCommand)
class AliasCommandsTest(hypetest.BaseCommandTestCase):

  def testAddAlias(self):
    response = self.command.Handle(hypetest.TEST_CHANNEL, hypetest.TEST_USER,
                                   '!alias add new original')
    self.assertEqual('Added alias new.', response)

    response = self.command.Handle(hypetest.TEST_CHANNEL, hypetest.TEST_USER,
                                   '!alias add new old')
    self.assertEqual('Updated alias new.', response)


@hypetest.ForCommand(bash_commands.EchoCommand)

class EchoCommandTest(hypetest.BaseCommandTestCase):