# Path: common/tests.py
# class CommonViewTest(base.ViewTestCase):
# class UtilTestCase(test.TestCase):
#   def test_redirect_slash(self):
#   def test_confirm(self):
#   def test_get_user_from_topic(self):


from common import messages
from common import profile
from common import util
from common.tests import ViewTestCase
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# 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.


class SmokeTest(ViewTestCase):
  def test_popular_channel_public(self):
    l = profile.label('channel_get_public')
    r = self.login_and_get(None, '/channel/popular')
    l.stop()
    self.assertContains(r, "Posts in #popular")
    self.assertWellformed(r)

  def test_wrong_case(self):
    r = self.login_and_get(None, '/channel/POPular')
    self.assertContains(r, "Posts in #popular")

# Path: common/tests.py
# class CommonViewTest(base.ViewTestCase):
# class UtilTestCase(test.TestCase):
#   def test_redirect_slash(self):
#   def test_confirm(self):
#   def test_get_user_from_topic(self):


# Path: channel/tests.py
from common import messages
from common import profile
from common import util
from common.tests import ViewTestCase

# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# 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.


class SmokeTest(ViewTestCase):
  def test_popular_channel_public(self):
    l = profile.label('channel_get_public')
    r = self.login_and_get(None, '/channel/popular')
    l.stop()
    self.assertContains(r, "Posts in #popular")
    self.assertWellformed(r)

  def test_wrong_case(self):
    r = self.login_and_get(None, '/channel/POPular')
    self.assertContains(r, "Posts in #popular")

    self.assertWellformed(r)