class SignatoryAdminTest(TestCase):
    def setUp(self):
        self.admin = SignatoryAdmin(Signatory, admin.site)
        Signatory.objects.create(
            name='Henrique Bastos', email='*****@*****.**',
            url='', location='')

    def test_has_action(self):
        self.assertIn('activate', self.admin.actions)

    def test_activate(self):
        self.admin.activate(Mock(), Signatory.objects.all())

        assert Signatory.objects.filter(is_active=True).count() == 1
class SignatoryAdminTest(TestCase):
    def setUp(self):
        self.admin = SignatoryAdmin(Signatory, admin.site)
        Signatory.objects.create(name='Henrique Bastos',
                                 email='*****@*****.**',
                                 url='',
                                 location='')

    def test_has_action(self):
        self.assertIn('activate', self.admin.actions)

    def test_activate(self):
        self.admin.activate(Mock(), Signatory.objects.all())

        assert Signatory.objects.filter(is_active=True).count() == 1
 def setUp(self):
     self.admin = SignatoryAdmin(Signatory, admin.site)
     Signatory.objects.create(name='Henrique Bastos',
                              email='*****@*****.**',
                              url='',
                              location='')
 def setUp(self):
     self.admin = SignatoryAdmin(Signatory, admin.site)
     Signatory.objects.create(
         name='Henrique Bastos', email='*****@*****.**',
         url='', location='')