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

All Samples(384)  |  Call(384)  |  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)
        clean_stats = self.log[0]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
    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]
        self.assertEqual(log_record.name, 'eos_test.cache_generator')

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_modifier.py   Eos(Download)
        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]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        self.assertEqual(len(data['modifiers']), 1)
        expected = {'modifier_id': 1, 'state': 2, 'context': 3, 'source_attribute_id': 4, 'operator': 5,
                    'target_attribute_id': 6, 'location': 7, 'filter_type': 8, 'filter_value': 9}
        self.assertEqual(data['modifiers'][1], expected)
        self.assertIn(111, data['effects'])
        modifiers = data['effects'][111]['modifiers']

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]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        self.assertEqual(clean_stats.msg, 'cleaned: 0.0% from invtypes')
        self.assertEqual(len(data['types']), 1)

src/e/o/Eos-HEAD/tests/cache_generator/cleanup/test_associated_data.py   Eos(Download)
        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.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        self.assertEqual(clean_stats.msg,
                         'cleaned: 0.0% from dgmattribs, 0.0% from dgmeffects, 0.0% from dgmexpressions, '
                         '0.0% from dgmtypeattribs, 0.0% from dgmtypeeffects, 0.0% from invgroups, 0.0% from invtypes')
        self.assertEqual(len(data['types']), 2)

src/e/o/Eos-HEAD/tests/cache_generator/checks/test_default_effects.py   Eos(Download)
    def test_normal(self):
        self.eff_link1['isDefault'] = False
        self.eff_link2['isDefault'] = True
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        self.assertEqual(len(data['types']), 1)
        self.assertEqual(len(data['types']), 1)
        self.assertIn(1, data['types'])
        self.assertEqual(len(data['effects']), 2)
        self.assertIn(2, data['effects'])
        self.assertEqual(data['effects'][2]['falloff_attribute_id'], 20)

src/e/o/Eos-HEAD/tests/cache_generator/checks/test_attr_value.py   Eos(Download)
    def test_int(self):
        self.dh.data['invtypes'].append({'typeID': 1, 'groupID': 1, 'typeName': ''})
        self.dh.data['dgmtypeattribs'].append({'typeID': 1, 'attributeID': 5, 'value': 8})
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        self.assertEqual(len(data['types']), 1)
        self.assertEqual(data['types'][1]['attributes'][5], 8)

src/e/o/Eos-HEAD/tests/cache_generator/checks/test_rack_collision.py   Eos(Download)
    def test_collision(self):
        data = self.run_generator()
        self.assertEqual(len(self.log), 2)
        clean_stats = self.log[0]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        log_record = self.log[1]
        self.assertEqual(log_record.name, 'eos_test.cache_generator')
        self.assertEqual(log_record.levelno, Logger.WARNING)

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_type.py   Eos(Download)
        })
        data = self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        self.assertEqual(len(data['types']), 1)
        self.assertIn(1, data['types'])
        type_row = data['types'][1]
        self.assertEqual(len(type_row), 6)

src/e/o/Eos-HEAD/tests/cache_generator/conversion/test_normalization_idzing.py   Eos(Download)
        mod_builder.return_value.build_effect.return_value = ([], 0)
        self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        # As in expression conversion, we're verifying expressions
        # passed to modifier builder, as it's much easier to do
        expressions = mod_builder.mock_calls[0][1][0]
        self.assertEqual(len(expressions), 1)
        mod_builder.return_value.build_effect.return_value = ([], 0)
        self.run_generator()
        self.assertEqual(len(self.log), 1)
        clean_stats = self.log[0]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')

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]
        self.assertEqual(clean_stats.name, 'eos_test.cache_generator')
        self.assertEqual(clean_stats.levelno, Logger.INFO)
        self.assertEqual(data['types'][1]['attributes'][Attribute.radius], 50.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]

  1 | 2  Next