Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(40)  |  Call(40)  |  Derive(0)  |  Import(0)

src/l/e/learnpython.in.ua-HEAD/learnpython/tests/test_flasktesting.py   learnpython.in.ua(Download)
            self.assert200(response)
            self.assertIn(
                'Cannot submit form! Please, fix errors below:', response.data
            )
            self.assertIn(error, response.data)
        response = self.client.get(url)
        self.assert200(response)
        self.assertIn(u'<h2>{0}</h2>'.format(page['title']), response.udata)
 
    def test_about(self):
        for flow in flows:
            name = flow.path.replace('flows/', '')
            self.assertIn('id="{0}"'.format(name), response.data)
 
    def test_index(self):
 
        for url in urls:
            self.assertIn('href="{0}"'.format(url), response.data)
 
    def test_nosubscribe(self):

src/l/e/learnpython.in.ua-HEAD/learnpython/tests/test_webtest.py   learnpython.in.ua(Download)
                response = form.submit()
                self.assertStatus(response, 302)
                self.assertIn(self.status_url, response.headers['Location'])
 
                args = [data.pop('name'), data.pop('email')]

src/f/l/Flask-And-Redis-HEAD/testapp/tests/test_views.py   Flask-And-Redis(Download)
    def test_home(self):
        response = self.client.get(self.home_url)
        self.assertIn('<h1>Flask-And-Redis test project</h1>', response.data)
 
        self.assertIn('>Redis information</h2>', response.data)
        self.assertIn('>Server</th>', response.data)
        self.assertIn('>Clients</th>', response.data)
        self.assertIn('>Memory</th>', response.data)

src/l/e/learnpython.in.ua-HEAD/learnpython/tests/test_data.py   learnpython.in.ua(Download)
    def check_flow(self, name, archive=False):
        prefix = 'flows' if not archive else 'archive/{0}'.format(archive)
        fullname = '{0}/{1}'.format(prefix, name)
        flow = self.check_page(fullname)
        self.assertIn('active', flow.meta)
        self.assertIn('order', flow.meta)
    def check_page(self, mixed):
        page = pages.get(mixed) if isinstance(mixed, basestring) else mixed
        self.assertIsNotNone(page)
 
        self.assertIn('title', page.meta)

src/f/l/Flask-And-Redis-HEAD/testapp/tests/test_flask_redis.py   Flask-And-Redis(Download)
    def test_config_prefix(self):
        redis = Redis(self.app, 'REDIS_BACKUP')
        self.assertIn('REDIS_BACKUP', self.app.extensions['redis'])
        redis.ping()
        self.assertRaises(ValueError, Redis, self.app, 'REDIS_BACKUP')
 
        redis = Redis()
        redis.init_app(self.app, 'REDIS_SLAVE')
        self.assertIn('REDIS_SLAVE', self.app.extensions['redis'])
    def test_default_behaviour(self):
        self.assertEqual(default_redis.config_prefix, 'REDIS')
        default_redis.ping()
        self.assertIn('redis', self.app.extensions)
 
    def test_init_app(self):
        self.assertIn('redis', self.app.extensions)
        self.app.extensions.pop('redis')
 
        redis = Redis()
            if attr.startswith('_') or not callable(getattr(instance, attr)):
                continue
            self.assertIn(attr, attributes)
 
    def test_unix_socket_path(self):

src/p/r/praxes-HEAD/praxes/io/spec/tests/test_file.py   praxes(Download)
    def test_contains(self):
        self.assertIn('1', self.f)
 
    def test_getitem(self):
        self.assertEqual(self.f['1'].name, '1')