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

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

src/e/o/Eos-HEAD/tests/cache_generator/checks/test_primary_key.py   Eos(Download)
    def test_single_proper_pk(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'typeName': ''})
        self.dh.data['invtypes'].append({'typeID': 2, 'groupID': 1, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
    def test_single_no_pk(self):
        self.dh.data['invtypes'].append({'groupID': 1, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        log_record = self.log[0]
    def test_single_invalid(self):
        self.dh.data['invtypes'].append({'typeID': 1.5, 'groupID': 1, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        log_record = self.log[0]
    def test_single_duplicate(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'typeName': ''})
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 920, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 2)
    def test_single_duplicate_reverse(self):
        # Make sure first fed by data_handler row is accepted
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 920, 'typeName': ''})
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'typeName': ''})
        data = self.run_generator()

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_type.py   Eos(Download)
            'fittingUsageChanceAttributeID': 41, 'preExpression': None, 'postExpression': None
        })
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_normalization_idzing.py   Eos(Download)
                                               'expressionGroupID': 567, 'expressionAttributeID': 102})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
                                               'expressionGroupID': None, 'expressionAttributeID': 102})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
                                               'expressionGroupID': None, 'expressionAttributeID': 102})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
                                               'expressionGroupID': 567, 'expressionAttributeID': 102})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
                                               'expressionGroupID': 57, 'expressionAttributeID': 12})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        self.run_generator()
        self.assertEqual(len(self.log), 2)
        multiple_warning = self.log[0]

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_normalization_attr.py   Eos(Download)
    def test_basic_attr_radius(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'radius': 50.0, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
    def test_basic_attr_mass(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'mass': 5.0, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
    def test_basic_attr_volume(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'volume': 500.0, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
    def test_basic_attr_capacity(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'capacity': 0.5, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_modifier.py   Eos(Download)
                       target_attribute_id=6, location=7, filter_type=8, filter_value=9)
        mod_builder.return_value.build_effect.return_value = ([mod], 0)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
                        target_attribute_id=600, location=700, filter_type=800, filter_value=900)
        mod_builder.return_value.build_effect.return_value = ([mod1, mod2], 0)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        arg_map = {(1, 11, 111): mod1, (111, 1, 111): mod2}
        mod_builder.return_value.build_effect.side_effect = lambda pre, post, cat: ([arg_map[(pre, post, cat)]], 0)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
                        target_attribute_id=76, location=87, filter_type=98, filter_value=90)
        mod_builder.return_value.build_effect.return_value = ([mod1, mod2], 0)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        arg_map = {(1, 11, 111): mod1, (111, 11, 1): mod2}
        mod_builder.return_value.build_effect.side_effect = lambda pre, post, cat: ([arg_map[(pre, post, cat)]], 0)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_expression.py   Eos(Download)
                                               'expressionAttributeID': 102, 'expressionValue': 'Kurr'})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_effect.py   Eos(Download)
                       target_attribute_id=6, location=7, filter_type=8, filter_value=9)
        mod_builder.return_value.build_effect.return_value = ([mod], 29)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_attribute.py   Eos(Download)
                                           'defaultValue': 0.0, 'attributeID': 111, 'highIsGood': False,
                                           'attributeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]

src/e/o/Eos-HEAD/tests/cache_generator/cleanup/test_types.py   Eos(Download)
    def test_group_character(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
    def test_group_effect_beacon(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 920, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
    def test_group_other(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 50, 'typeName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
    def test_group_character_unpublished(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'typeName': '', 'published': False})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
    def test_category_ship(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 50, 'typeName': ''})
        self.dh.data['invgroups'].append({'groupID': 50, 'categoryID': 6, 'groupName': ''})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)

src/e/o/Eos-HEAD/tests/cache_generator/cleanup/test_associated_data.py   Eos(Download)
        self.dh.data['invgroups'].append({'groupID': 5, 'categoryID': 16, 'groupName': ''})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        self.dh.data['invgroups'].append({'groupID': 5, 'categoryID': 101, 'groupName': ''})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
    def test_unlinked(self, mod_builder):
        self.__generate_data()
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        self.dh.data['invgroups'].append({'groupID': 6, 'categoryID': 50, 'groupName': ''})
        mod_builder.return_value.build_effect.return_value = ([], 0)
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]

  1 | 2  Next