When I send a test email to myself the custom fields do not get replaced with the correct data.

When you send a preview email to yourself you will simply see the custom field place holders. This is because at this stage there is no contact list associated with the email at this point in time. The place holders simply show you where data will be located.

If you would like to see the data instead of the place holders you will need to add yourself to the contact list and send an email to yourself as a test.