Exemplo n.º 1
0
 def test_it_is_case_insensitive_when_decoding(self):
     self.assertTrue(CsvSyncActionsDecoder.decode('c').create)
     self.assertTrue(CsvSyncActionsDecoder.decode('C').create)
     self.assertTrue(CsvSyncActionsDecoder.decode('u').update)
     self.assertTrue(CsvSyncActionsDecoder.decode('U').update)
     self.assertTrue(CsvSyncActionsDecoder.decode('d').delete)
     self.assertTrue(CsvSyncActionsDecoder.decode('D').delete)
Exemplo n.º 2
0
 def test_it_is_case_insensitive_when_decoding(self):
     self.assertTrue(CsvSyncActionsDecoder.decode('c').create)
     self.assertTrue(CsvSyncActionsDecoder.decode('C').create)
     self.assertTrue(CsvSyncActionsDecoder.decode('u').update)
     self.assertTrue(CsvSyncActionsDecoder.decode('U').update)
     self.assertTrue(CsvSyncActionsDecoder.decode('d').delete)
     self.assertTrue(CsvSyncActionsDecoder.decode('D').delete)
Exemplo n.º 3
0
 def test_it_produces_object_with_no_actions_if_input_invalid(self):
     result = CsvSyncActionsDecoder.decode(123)
     self.assertFalse(result.create)
     self.assertFalse(result.update)
     self.assertFalse(result.delete)
     self.assertFalse(result.force)
Exemplo n.º 4
0
 def test_it_produces_object_with_no_actions_if_input_invalid(self):
     result = CsvSyncActionsDecoder.decode(123)
     self.assertFalse(result.create)
     self.assertFalse(result.update)
     self.assertFalse(result.delete)
     self.assertFalse(result.force)