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_ship_type_group.py   Eos(Download)
        item = self.ch.type_(type_id=1, attributes={Attribute.can_fit_ship_type_1: 10})
        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.ship_type_group)
        self.assertIsNotNone(restriction_error)
        item = self.ch.type_(type_id=1, attributes={Attribute.can_fit_ship_type_2: 10})
        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.ship_type_group)
        self.assertIsNotNone(restriction_error)
        item = self.ch.type_(type_id=1, attributes={Attribute.can_fit_ship_type_3: 10})
        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.ship_type_group)
        self.assertIsNotNone(restriction_error)
        item = self.ch.type_(type_id=1, attributes={Attribute.can_fit_ship_type_4: 10})
        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.ship_type_group)
        self.assertIsNotNone(restriction_error)
        item = self.ch.type_(type_id=1, attributes={Attribute.fits_to_shiptype: 10})
        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.ship_type_group)
        self.assertIsNotNone(restriction_error)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_holder_class.py   Eos(Download)
    def test_booster_pass(self):
        item = self.ch.type_(type_id=1, category_id=Category.implant, attributes={Attribute.boosterness: 3})
        holder = Booster(1)
        holder.item = item
        self.track_holder(holder)
    def test_booster_fail_category(self):
        item = self.ch.type_(type_id=1, category_id=1008, attributes={Attribute.boosterness: 3})
        holder = Booster(1)
        holder.item = item
        self.track_holder(holder)
    def test_booster_fail_attr(self):
        item = self.ch.type_(type_id=1, category_id=Category.implant)
        holder = Booster(1)
        holder.item = item
        self.track_holder(holder)
    def test_character_pass(self):
        item = self.ch.type_(type_id=1, group_id=Group.character)
        holder = Character(1)
        holder.item = item
        self.track_holder(holder)
    def test_character_fail_group(self):
        item = self.ch.type_(type_id=1, group_id=1008)
        holder = Character(1)
        holder.item = item
        self.track_holder(holder)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_charge_group.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_group)
        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_group)
        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_group)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_drone_group.py   Eos(Download)
        item = self.ch.type_(type_id=1, group_id=56)
        holder = Mock(state=State.offline, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2, attributes={Attribute.allowed_drone_group_1: 4})
        ship_holder = Mock(state=State.offline, item=ship_item, _location=None, spec_set=Ship(1))
        item = self.ch.type_(type_id=1, group_id=797)
        holder = Mock(state=State.offline, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2, attributes={Attribute.allowed_drone_group_2: 69})
        ship_holder = Mock(state=State.offline, item=ship_item, _location=None, spec_set=Ship(1))
        item = self.ch.type_(type_id=1, group_id=803)
        holder = Mock(state=State.offline, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2, attributes={Attribute.allowed_drone_group_1: 48,
                                                         Attribute.allowed_drone_group_2: 106})
        item = self.ch.type_(type_id=1, group_id=37)
        holder = Mock(state=State.offline, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2, attributes={Attribute.allowed_drone_group_1: 59})
        ship_holder = Mock(state=State.offline, item=ship_item, _location=None, spec_set=Ship(1))
        item = self.ch.type_(type_id=1, group_id=None)
        holder = Mock(state=State.offline, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder)
        ship_item = self.ch.type_(type_id=2, attributes={Attribute.allowed_drone_group_1: 1896})
        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_max_group_online.py   Eos(Download)
        item = self.ch.type_(type_id=1, group_id=6, attributes={Attribute.max_group_online: 1})
        holder1 = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder1)
        holder2 = Mock(state=State.online, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder2)
        item1 = self.ch.type_(type_id=1, group_id=92, attributes={Attribute.max_group_online: 1})
        holder1 = Mock(state=State.online, item=item1, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder1)
        item2 = self.ch.type_(type_id=2, group_id=92, attributes={Attribute.max_group_online: 2})
        holder2 = Mock(state=State.online, item=item2, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder2)
        holder1 = Mock(state=State.online, item=item1, _location=Location.ship, spec_set=ModuleHigh(1))
        holder1.attributes = {Attribute.max_group_online: 2}
        self.track_holder(holder1)
        item2 = self.ch.type_(type_id=2, group_id=61, attributes={Attribute.max_group_online: 2})
        holder2 = Mock(state=State.online, item=item2, _location=Location.ship, spec_set=ModuleHigh(1))

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_max_group_active.py   Eos(Download)
        item = self.ch.type_(type_id=1, group_id=6, attributes={Attribute.max_group_active: 1})
        holder1 = Mock(state=State.active, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder1)
        holder2 = Mock(state=State.active, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder2)
        item1 = self.ch.type_(type_id=1, group_id=92, attributes={Attribute.max_group_active: 1})
        holder1 = Mock(state=State.active, item=item1, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder1)
        item2 = self.ch.type_(type_id=2, group_id=92, attributes={Attribute.max_group_active: 2})
        holder2 = Mock(state=State.active, item=item2, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder2)
        holder1 = Mock(state=State.active, item=item1, _location=Location.ship, spec_set=ModuleHigh(1))
        holder1.attributes = {Attribute.max_group_active: 2}
        self.track_holder(holder1)
        item2 = self.ch.type_(type_id=2, group_id=61, attributes={Attribute.max_group_active: 2})
        holder2 = Mock(state=State.active, item=item2, _location=Location.ship, spec_set=ModuleHigh(1))

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_max_group_fitted.py   Eos(Download)
        item = self.ch.type_(type_id=1, group_id=6, attributes={Attribute.max_group_fitted: 1})
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder1)
        holder2 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder2)
        item1 = self.ch.type_(type_id=1, group_id=92, attributes={Attribute.max_group_fitted: 1})
        holder1 = Mock(state=State.offline, item=item1, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder1)
        item2 = self.ch.type_(type_id=2, group_id=92, attributes={Attribute.max_group_fitted: 2})
        holder2 = Mock(state=State.offline, item=item2, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder2)
        holder1 = Mock(state=State.offline, item=item1, _location=Location.ship, spec_set=ModuleHigh(1))
        holder1.attributes = {Attribute.max_group_fitted: 2}
        self.track_holder(holder1)
        item2 = self.ch.type_(type_id=2, group_id=61, attributes={Attribute.max_group_fitted: 2})
        holder2 = Mock(state=State.offline, item=item2, _location=Location.ship, spec_set=ModuleHigh(1))

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_launched_drone.py   Eos(Download)
        item = self.ch.type_(type_id=1)
        holder = Mock(state=State.online, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder)
        self.fit.stats.launched_drones.used = 1
        self.fit.stats.launched_drones.total = 0
        item = self.ch.type_(type_id=1)
        holder = Mock(state=State.online, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder)
        self.fit.stats.launched_drones.used = 1
        self.fit.stats.launched_drones.total = None
        holder1 = Mock(state=State.online, item=item, _location=Location.space, spec_set=Drone(1))
        holder2 = Mock(state=State.online, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder1)
        self.track_holder(holder2)
        self.fit.stats.launched_drones.used = 2
    def test_pass_equal(self):
        item = self.ch.type_(type_id=1)
        holder1 = Mock(state=State.online, item=item, _location=Location.space, spec_set=Drone(1))
        holder2 = Mock(state=State.online, item=item, _location=Location.space, spec_set=Drone(1))
        self.track_holder(holder1)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_charge_volume.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_volume)
        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_volume)
        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_volume)

src/e/o/Eos-HEAD/tests/restriction_tracker/restrictions/test_subsystem_index.py   Eos(Download)
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=Subsystem(1))
        holder2 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=Subsystem(1))
        self.track_holder(holder1)
        self.track_holder(holder2)
        restriction_error1 = self.get_restriction_error(holder1, Restriction.subsystem_index)
        holder1 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        holder2 = Mock(state=State.offline, item=item, _location=Location.ship, spec_set=ModuleHigh(1))
        self.track_holder(holder1)
        self.track_holder(holder2)
        restriction_error1 = self.get_restriction_error(holder1, Restriction.subsystem_index)
        holder1.attributes = {Attribute.subsystem_slot: 119}
        holder2.attributes = {Attribute.subsystem_slot: 121}
        self.track_holder(holder1)
        self.track_holder(holder2)
        restriction_error1 = self.get_restriction_error(holder1, Restriction.subsystem_index)

  1 | 2 | 3  Next