Example #1
0
 def test_tags_add(self):
     actual = GN.tags_add(
         self.tag_map,
         k0='A,B',
         k1='C',
         k2='',
     )
     expected = 'a,b,c'
     self.assertEqual(actual, expected)
Example #2
0
 def test_fix_date_empty(self):
     actual = GN.fix_date(date='')
     expected = ''
     self.assertEqual(actual, expected)
Example #3
0
 def test_state_get(self):
     actual = GN.state_get()
     expected = 'Sheffield'
     self.assertEqual(actual, expected)
Example #4
0
 def test_doa2dob_empty(self):
     actual = GN.doa2dob(doa='')
     expected = ''
     self.assertEqual(actual, expected)
Example #5
0
 def test_fix_date(self):
     actual = GN.fix_date(date='31/12/1956')
     expected = '12/31/1956'
     self.assertEqual(actual, expected)
Example #6
0
 def test_tags_split_bad_key(self):
     k0 = 'A,B,XXX'
     actual = GN.tags_split(self.tag_map, k0)
     expected = ['a', 'b']
     self.assertEqual(actual, expected)
Example #7
0
 def test_doa2dob_empty(self):
     actual = GN.doa2dob(doa='')
     expected = ''
     self.assertEqual(actual, expected)
Example #8
0
 def test_tags_split(self):
     fieldvalue = 'A,B'
     actual = GN.tags_split(self.tag_map, fieldvalue)
     expected = ['a', 'b']
     self.assertEqual(actual, expected, actual)
Example #9
0
 def test_tags_split_bad_key(self):
     k0 = 'A,B,XXX'
     actual = GN.tags_split(self.tag_map, k0)
     expected = ['a', 'b']
     self.assertEqual(actual, expected)
Example #10
0
 def test_tags_add(self):
     actual = GN.tags_add(self.tag_map, k0='A,B', k1='C', k2='',)
     expected = 'a,b,c'
     self.assertEqual(actual, expected)
Example #11
0
 def test_tags_add_key_error(self):
     actual = GN.tags_add(self.tag_map, k0='A,B,XXX')
     expected = 'a,b'
     self.assertEqual(actual, expected)
Example #12
0
 def test_state_get(self):
     actual = GN.state_get()
     expected = 'Sheffield'
     self.assertEqual(actual, expected)
Example #13
0
 def test_fix_date_empty(self):
     actual = GN.fix_date(date='')
     expected = ''
     self.assertEqual(actual, expected)
Example #14
0
 def test_fix_date(self):
     actual = GN.fix_date(date='31/12/1956')
     expected = '12/31/1956'
     self.assertEqual(actual, expected)
Example #15
0
 def test_tags_add_key_error(self):
     actual = GN.tags_add(self.tag_map, k0='A,B,XXX')
     expected = 'a,b'
     self.assertEqual(actual, expected)
Example #16
0
 def test_value_get(self):
     value = 'asdf'
     actual = GN.value_get(value)
     expected = value
     self.assertEqual(actual, expected, actual)
Example #17
0
 def test_tags_split(self):
     fieldvalue = 'A,B'
     actual = GN.tags_split(self.tag_map, fieldvalue)
     expected = ['a', 'b']
     self.assertEqual(actual, expected, actual)
Example #18
0
 def test_doa2dob(self):
     actual = GN.doa2dob(doa='31/12/2018')
     expected = '12/31/2000'
     self.assertEqual(actual, expected)
Example #19
0
 def test_value_get(self):
     value = 'asdf'
     actual = GN.value_get(value)
     expected = value
     self.assertEqual(actual, expected, actual)
Example #20
0
 def test_doa2dob(self):
     actual = GN.doa2dob(doa='31/12/2018')
     expected = '12/31/2000'
     self.assertEqual(actual, expected)