Пример #1
0
 def test_nullable_string(self):
     self.assertEqual(Loader.nullable_string("BANK"), "BANK")
Пример #2
0
 def test_nullable_int_strip(self):
     self.assertEqual(Loader.nullable_int(" 3 "), 3)
Пример #3
0
 def test_nullable_int_empty(self):
     self.assertIsNone(Loader.nullable_int(""))
Пример #4
0
 def test_string_to_boolean_0(self):
     self.assertFalse(Loader.string_to_boolean("0"))
Пример #5
0
 def test_string_to_boolean_empty(self):
     self.assertIsNone(Loader.string_to_boolean(""))
Пример #6
0
 def test_nullable_int(self):
     self.assertEqual(Loader.nullable_int('3'), 3)
Пример #7
0
 def test_string_to_boolean_capitalization(self):
     self.assertTrue(Loader.string_to_boolean("TrUe"))
Пример #8
0
 def test_string_to_boolean_other_is_none(self):
     self.assertIsNone(Loader.string_to_boolean('frog'))
Пример #9
0
 def test_string_to_boolean_empty(self):
     self.assertIsNone(Loader.string_to_boolean(''))
Пример #10
0
 def test_string_to_boolean_1(self):
     self.assertTrue(Loader.string_to_boolean('1'))
Пример #11
0
 def test_string_to_boolean_0(self):
     self.assertFalse(Loader.string_to_boolean('0'))
Пример #12
0
 def test_string_to_boolean_capitalization(self):
     self.assertTrue(Loader.string_to_boolean('TrUe'))
Пример #13
0
 def test_string_to_boolean_true(self):
     self.assertTrue(Loader.string_to_boolean('true'))
Пример #14
0
 def test_nullable_string(self):
     self.assertEqual(Loader.nullable_string('BANK'), 'BANK')
Пример #15
0
 def test_nullable_string_whitespace(self):
     self.assertIsNone(Loader.nullable_string(" "))
Пример #16
0
 def test_nullable_int_strip(self):
     self.assertEqual(Loader.nullable_int(' 3 '), 3)
Пример #17
0
 def test_nullable_decimal_empty(self):
     self.assertIsNone(Loader.nullable_decimal(""))
Пример #18
0
 def test_nullable_int_float(self):
     self.assertEqual(Loader.nullable_int('3.00'), 3)
Пример #19
0
 def test_string_to_boolean_true(self):
     self.assertTrue(Loader.string_to_boolean("true"))
Пример #20
0
 def test_nullable_int_empty(self):
     self.assertIsNone(Loader.nullable_int(''))
Пример #21
0
 def test_string_to_boolean_1(self):
     self.assertTrue(Loader.string_to_boolean("1"))
Пример #22
0
 def test_nullable_int_whitespace(self):
     self.assertIsNone(Loader.nullable_int('  '))
Пример #23
0
 def test_string_to_boolean_other_is_none(self):
     self.assertIsNone(Loader.string_to_boolean("frog"))
Пример #24
0
 def test_nullable_string(self):
     self.assertEqual(Loader.nullable_string('BANK'), 'BANK')
Пример #25
0
 def test_base_class_not_implemented(self):
     with self.assertRaises(NotImplementedError):
         Loader(ContentFile("HEADER\ncontent")).load()
Пример #26
0
 def test_nullable_string_empty(self):
     self.assertIsNone(Loader.nullable_string(''))
Пример #27
0
 def test_nullable_int_float(self):
     self.assertEqual(Loader.nullable_int("3.00"), 3)
Пример #28
0
 def test_nullable_string_whitespace(self):
     self.assertIsNone(Loader.nullable_string(' '))
Пример #29
0
 def test_nullable_int_whitespace(self):
     self.assertIsNone(Loader.nullable_int("  "))
Пример #30
0
 def test_nullable_decimal(self):
     self.assertEqual(Loader.nullable_decimal('3.5'), Decimal('3.5'))
Пример #31
0
 def test_nullable_string_empty(self):
     self.assertIsNone(Loader.nullable_string(""))
Пример #32
0
 def test_nullable_decimal_empty(self):
     self.assertIsNone(Loader.nullable_decimal(''))
Пример #33
0
 def test_nullable_decimal(self):
     self.assertEqual(Loader.nullable_decimal("3.5"), Decimal("3.5"))
Пример #34
0
 def test_nullable_decimal_whitespace(self):
     self.assertIsNone(Loader.nullable_decimal(' '))
Пример #35
0
 def test_nullable_decimal_whitespace(self):
     self.assertIsNone(Loader.nullable_decimal(" "))
Пример #36
0
 def test_string_to_boolean_false(self):
     self.assertFalse(Loader.string_to_boolean('false'))