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

All Samples(16)  |  Call(13)  |  Derive(0)  |  Import(3)

src/c/n/cnucnuweb-HEAD/tests/test_flask_api.py   cnucnuweb(Download)
import cnucnuweb
import cnucnuweb.model as model
from tests import Modeltests, create_distro, create_project, create_package
 
 
    def test_api_projects(self):
        """ Test the api_projects function of the API. """
        create_distro(self.session)
 
        output = self.app.get('/api/projects')
    def test_api_projects_list(self):
        """ Test the api_projects_list function of the API. """
        create_distro(self.session)
        output = self.app.get('/api/projects/wiki/')
        self.assertEqual(output.status_code, 200)
    def test_api_projects_names(self):
        """ Test the api_projects_names function of the API. """
        create_distro(self.session)
        output = self.app.get('/api/projects/names')
        self.assertEqual(output.status_code, 200)
    def test_api_get_version(self):
        """ Test the api_get_version function of the API. """
        create_distro(self.session)
        output = self.app.post('/api/version')
        self.assertEqual(output.status_code, 301)

src/c/n/cnucnuweb-HEAD/tests/test_model.py   cnucnuweb(Download)
 
import cnucnuweb.model as model
from tests import Modeltests, create_distro, create_project, create_package
 
 
    def test_init_distro(self):
        """ Test the __init__ function of Distro. """
        create_distro(self.session)
        self.assertEqual(2, model.Distro.all(self.session, count=True))
 

src/c/n/cnucnuweb-HEAD/tests/test_distro.py   cnucnuweb(Download)
 
import cnucnuweb.model as model
from tests import Modeltests, create_distro
 
 
    def test_init_distro(self):
        """ Test the __init__ function of Distro. """
        create_distro(self.session)
        self.assertEqual(2, model.Distro.all(self.session, count=True))
 
    def test_distro_by_name(self):
        """ Test the by_name function of Distro. """
        create_distro(self.session)
 
        distro = model.Distro.by_name(self.session, 'fedora')
    def test_distro_all(self):
        """ Test the all function of Distro. """
        create_distro(self.session)
 
        distro = model.Distro.all(self.session, page=2)
    def test_distro_json(self):
        """ Test the __json__ function of Distro. """
        create_distro(self.session)
 
        distro = model.Distro.by_name(self.session, 'fedora')