class TestApplication(TestCase): """Run tests on the `Application` class.""" def setUp(self): """Setup some default variables for test usage.""" self.a = Application('application', 'data') def test_attrs_stick(self): """Ensure attributes stick.""" self.assertEqual(self.a.application, 'application') self.assertEqual(self.a.data, 'data') def test_render_valid_application(self): """Ensure `render` works using a valid `application` attribute.""" self.assertTrue('application' in ''.join(self.a.render())) def test_str_valid_data(self): """Ensure `render` works using a valid `data` attribute.""" self.assertTrue('data' in ''.join(self.a.render()))
class TestApplication(TestCase): """Run tests on the `Application` class.""" def setUp(self): """Setup some default variables for test usage.""" self.a = Application('application', 'data') def test_attrs_stick(self): """Ensure attributes stick.""" eq_(self.a.application, 'application') eq_(self.a.data, 'data') def test_render_valid_application(self): """Ensure `render` works using a valid `application` attribute.""" ok_('application' in ''.join(self.a.render())) def test_str_valid_data(self): """Ensure `render` works using a valid `data` attribute.""" ok_('data' in ''.join(self.a.render()))