Did I find the right examples for you? yes no

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

src/t/u/tuskar-0.4.1/tuskar/api/controllers/v1/models.py   tuskar(Download)
            for key, value in self.attributes.items():
                translated.append(db_models.OvercloudAttribute(
                    key=key, value=value, overcloud_id=self.id
                ))
            db_model.attributes = translated

src/t/u/tuskar-0.4.1/tuskar/tests/api/controllers/v1/test_models.py   tuskar(Download)
    def test_from_db_model(self):
        # Setup
        db_attrs = [
            db_models.OvercloudAttribute(
                id=10,
            ),
            db_models.OvercloudAttribute(
                id=20,
                overcloud_id=1,
                key='key-2',

src/t/u/tuskar-0.4.1/tuskar/tests/api/controllers/v1/test_overcloud.py   tuskar(Download)
 
        attribute_1 = db_models.OvercloudAttribute(
            overcloud_id=1, key='name', value='updated')
 
        fake_updated = db_models.Overcloud(name='after-update',

src/t/u/tuskar-0.4.1/tuskar/tests/db/test_models.py   tuskar(Download)
    def test_equal(self):
        # Setup
        attr_1 = models.OvercloudAttribute(overcloud_id='foo', key='bar')
        attr_2 = models.OvercloudAttribute(overcloud_id='foo', key='bar')
 
    def test_same_overcloud_different_key(self):
        # Setup
        attr_1 = models.OvercloudAttribute(overcloud_id='foo', key='bar')
        attr_2 = models.OvercloudAttribute(overcloud_id='foo', key='rab')
 
    def test_different_overcloud_same_key(self):
        # Setup
        attr_1 = models.OvercloudAttribute(overcloud_id='oof', key='bar')
        attr_2 = models.OvercloudAttribute(overcloud_id='foo', key='bar')
 

src/t/u/tuskar-0.4.1/tuskar/tests/db/test_api.py   tuskar(Download)
 
        self.attributes_1 = models.OvercloudAttribute(
            key='key-1',
            value='value-1',
        )
 
        self.attributes_2 = models.OvercloudAttribute(
            key='key-2',
    def test_create_overcloud_duplicate_attribute(self):
        # Setup
        duplicate_attribute = models.OvercloudAttribute(
            key=self.attributes_1.key,
            value='irrelevant'
        # Add a third attribute for enough data
        self.overcloud_1.attributes.append(models.OvercloudAttribute(
            key='key-3',
            value='value-3',
        ))
        # - Add a fourth
        saved.attributes.append(models.OvercloudAttribute(
            key='key-4',
            value='value-4',
        ))