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

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

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_dronebay_volume.py   Eos(Download)
        holder.attributes = {Attribute.volume: 50}
        self.fit.drones.add(holder)
        self.track_holder(holder)
        self.fit.stats.dronebay.used = 50
        self.fit.stats.dronebay.output = 40
        holder.attributes = {Attribute.volume: 5}
        self.fit.drones.add(holder)
        self.track_holder(holder)
        self.fit.stats.dronebay.used = 5
        self.fit.stats.dronebay.output = None
        holder1.attributes = {Attribute.volume: 25}
        self.fit.drones.add(holder1)
        self.track_holder(holder1)
        holder2 = Mock(state=State.offline, item=item, _location=Location.space, spec_set=Drone(1))
        holder2.attributes = {Attribute.volume: 20}
        self.fit.drones.add(holder2)
        self.track_holder(holder2)
        holder.attributes = {Attribute.volume: 100}
        self.fit.drones.add(holder)
        self.track_holder(holder)
        self.fit.stats.dronebay.used = 100
        self.fit.stats.dronebay.output = 50

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_capital_item.py   Eos(Download)
        item = self.ch.type_(type_id=1, attributes={Attribute.volume: 501})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.capital_item)
        self.assertIsNotNone(restriction_error)
        item = self.ch.type_(type_id=1, attributes={Attribute.volume: 501})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2)
        ship_holder = Mock(state=State.offline, item=ship_item, _location=None, spec_set=Ship(1))
        # are taken
        holder.attributes = {Attribute.volume: 100}
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2)
        ship_holder = Mock(state=State.offline, item=ship_item, _location=None, spec_set=Ship(1))
        item = self.ch.type_(type_id=1, attributes={Attribute.volume: 500})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.capital_item)
        self.assertIsNone(restriction_error)
        item = self.ch.type_(type_id=1, attributes={Attribute.volume: 501})
        holder = Mock(state=State.offline, item=item, _location=None, spec_set=Ship(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.capital_item)
        self.assertIsNone(restriction_error)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_skill_requirement.py   Eos(Download)
        item.required_skills = {50: 3}
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.skill_requirement)
        self.assertIsNotNone(restriction_error)
        item.required_skills = {48: 1, 50: 5}
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        skill_item = self.ch.type_(type_id=50)
        skill_holder = Mock(state=State.offline, item=skill_item, _location=Location.character, spec_set=Skill(1))
        skill_holder.level = 2
        self.track_holder(skill_holder)
        item.required_skills = {48: 1, 50: 5}
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder)
        skill_item = self.ch.type_(type_id=48)
        skill_holder = Mock(state=State.offline, item=skill_item, _location=Location.character, spec_set=Skill(1))
        skill_holder.level = 5
        self.track_holder(skill_holder)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_charge_size.py   Eos(Download)
        container_holder.charge = charge_holder
        charge_holder.container = container_holder
        self.track_holder(container_holder)
        self.track_holder(charge_holder)
        restriction_error1 = self.get_restriction_error(container_holder, Restriction.charge_size)
        container_holder.charge = charge_holder
        charge_holder.container = container_holder
        self.track_holder(container_holder)
        self.track_holder(charge_holder)
        restriction_error1 = self.get_restriction_error(container_holder, Restriction.charge_size)
        container_holder.charge = charge_holder
        charge_holder.container = container_holder
        self.track_holder(container_holder)
        self.track_holder(charge_holder)
        restriction_error1 = self.get_restriction_error(container_holder, Restriction.charge_size)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_rig_size.py   Eos(Download)
        item = self.ch.type_(type_id=1, attributes={Attribute.rig_size: 10})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=Rig(1))
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2, attributes={Attribute.rig_size: 6})
        ship_holder = Mock(state=State.offline, item=ship_item, _location=None, spec_set=Ship(1))
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=Rig(1))
        holder.attributes = {Attribute.rig_size: 5}
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2, attributes={Attribute.rig_size: 6})
        ship_holder = Mock(state=State.offline, item=ship_item, _location=None, spec_set=Ship(1))
        item = self.ch.type_(type_id=1, attributes={Attribute.rig_size: 10})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=Rig(1))
        self.track_holder(holder)
        restriction_error = self.get_restriction_error(holder, Restriction.rig_size)
        self.assertIsNone(restriction_error)
        item = self.ch.type_(type_id=1, attributes={Attribute.rig_size: 10})
        holder = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=Rig(1))
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2)
        ship_holder = Mock(state=State.offline, item=ship_item, _location=None, spec_set=Ship(1))

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_state.py   Eos(Download)
    def test_state_lower(self):
        item = self.ch.type_(type_id=1)
        item.max_state = State.active
        holder = Mock(state=State.online, item=item, _location=Location.character, spec_set=ModuleHigh(1))
        self.track_holder(holder)
    def test_state_equal(self):
        item = self.ch.type_(type_id=1)
        item.max_state = State.active
        holder = Mock(state=State.active, item=item, _location=Location.character, spec_set=ModuleHigh(1))
        self.track_holder(holder)
    def test_state_higher(self):
        item = self.ch.type_(type_id=1)
        item.max_state = State.active
        holder = Mock(state=State.overload, item=item, _location=Location.character, spec_set=ModuleHigh(1))
        self.track_holder(holder)

Previous  1 | 2 | 3