def test_schema_name_present(self): """Test that the serializer contains schema_name.""" serializer = AdminCustomerSerializer(data=self.customer_data[0]) serializer.is_valid() serializer.save() expected_schema_name = _create_schema_name(serializer.data.get('name')) schema_name = serializer.data.get('schema_name') self.assertIsNotNone(schema_name) self.assertEqual(schema_name, expected_schema_name)
def test_schema_name_present(self): """Test that the serializer contains schema_name.""" customer = self.create_mock_customer_data() serializer = AdminCustomerSerializer(data=customer) serializer.is_valid() serializer.save() expected_schema_name = create_schema_name( serializer.data.get("account_id")) schema_name = serializer.data.get("schema_name") self.assertIsNotNone(schema_name) self.assertEqual(schema_name, expected_schema_name)