'Tests save action for Microsite model form.'

def test_save_action_admin_form(self):

    new_values = {'domain_prefix': 'test-site-new', 'platform_name': 'Test    Site    New'}
    microsite_form = self.microsite_admin.get_form(self.request)(instance=self.microsite, data={'key': self.microsite.key, 'site': self.microsite.site.id, 'values': new_values})
    self.assertTrue(microsite_form.is_valid())
    microsite_form.save()
    new_microsite = Microsite.objects.get(key=self.microsite.key)
    self.assertEqual(new_microsite.values, new_values)
