def test_edit_link_view(self):
        link1 = Link()
        link1.member = self.member
        link1.name = 'Google'
        link1.url = 'http://www.google.com/'
        link1.save()

        url = reverse('link_edit_view',
                      kwargs={'business_slug': self.member.slug, 'id': 1})
        response = self.client.get(url)
        self.assertEqual(response.status_code, 200)
    def setUp(self):
        self.org = Organization(
            account_num=1,
            org_name="Test Org",
            exclude_from_website=0,
            is_member=True,
            member_type="Business",
            business_member_level="Business Leader",
            org_type="Hospitality",
            longitude="-71.117111",
            latitude="42.376266",
            city="Cambridge",
            state="MA",
            country="United States",
            primary_email="*****@*****.**")
        self.org.save()
        self.client = Client()
        self.user = User.objects.create_user(
            username='******', email='*****@*****.**', password='******')
        self.client.login(username='******', password='******')

        self.member = Member(organization=self.org)
        self.member.save()

        self.category1 = SustainabilityTopic(name='Test1', slug='test1')
        self.category1.save()
        self.category2 = SustainabilityTopic(name='Test2', slug='test2')
        self.category2.save()
        self.category3 = SustainabilityTopic(name='Test3', slug='test3')
        self.category3.save()

        self.authorized_user = AuthorizedUser(
            email='*****@*****.**', member=self.member)
        self.authorized_user.save()

        link1 = Link()
        link1.member = self.member
        link1.name = 'Google'
        link1.url = 'http://www.google.com/'
        link1.save()
        link2 = Link()
        link2.member = self.member
        link2.name = 'Yahoo'
        link2.url = 'http://www.yahoo.com/'
        link2.save()