Did I find the right examples for you? yes no

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

src/c/o/conjure-HEAD/tests/test_documents.py   conjure(Download)
        BlogPost.drop_collection()
 
        author = self.User(username='stanislav')
        author.save()
 
    def test_creation(self):
        user = self.User(name="Test User", age=30)
        self.assertEqual(user.name, "Test User")
        self.assertEqual(user.age, 30)
 
    def test_reload(self):
        user = self.User(name="Test User", age=20)
    def test_dictionary_access(self):
        user = self.User(name='Test User', age=30)
        self.assertEquals(user['name'], 'Test User')
 
        self.assertRaises(KeyError, user.__getitem__, 'salary')
    def test_save(self):
        user = self.User(name='Test User', age=30)
        user.save()
 
        person_obj = self.User.objects.find_one(self.User.name == 'Test User')

src/c/o/cormoran-0.1/tests/unit/test_fields.py   cormoran(Download)
    def test_set_stores_value_in_persistent_data_store(self):
        user = self.User(field=self.valid())
 
        assert_that(user.__cormoran_data__, has_entry(u'field', self.valid()))
 
    def test_set_invalid_value_raises_value_error(self):
        with assert_raises(ValueError):
            self.User(field=self.invalid())
    def test_set_none_value_if_not_nullable_raises_value_error(self):
        with assert_raises(ValueError):
            self.User(another=None)
 
    def setUp(self):

src/c/o/cormoran-HEAD/tests/unit/test_fields.py   cormoran(Download)
    def test_set_stores_value_in_persistent_data_store(self):
        user = self.User(field=self.valid())
 
        assert_that(user.__cormoran_data__, has_entry(u'field', self.valid()))
 
    def test_set_invalid_value_raises_value_error(self):
        with assert_raises(ValueError):
            self.User(field=self.invalid())
    def test_set_none_value_if_not_nullable_raises_value_error(self):
        with assert_raises(ValueError):
            self.User(another=None)
 
    def setUp(self):

src/t/o/torext-0.9.3/torext/test/sql_test.py   torext(Download)
    def test_create_delete(self):
        u = self.User(name='reorx')
        self.db.session.add(u)
        self.db.session.commit()
 

src/t/r/trytond_prestashop-2.8.0.1dev/tests/test_prestashop.py   trytond_prestashop(Download)
                'currency': self.usd.id,
            }])
        self.User.write([self.User(USER)], {
            'main_company': self.company.id,
            'company': self.company.id,

src/t/r/trytond_magento-2.8.0.2/tests/test_base.py   trytond_magento(Download)
            }])
 
        self.User.write([self.User(USER)], {
            'main_company': self.company.id,
            'company': self.company.id,