Skip to content

Commit

Permalink
# This is a combination of 2 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

Create TestBugAdmin file

Add TestBugAdmin test file

Fixes

- Changed name of the test method, as previous was not correct
- Added new line at the end of the file

Remove unused code

Add class description

Add docstring on top

Add TestBugAdmin test file

# This is the commit message kiwitcms#2:

Remove unused code
  • Loading branch information
z-zafirov committed Apr 9, 2020
1 parent 81f7ace commit e587dd9
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tcms/bugs/tests/test_admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name

'''
This module contains tests for the Admin view ('Everything' else page)
'''

from django.urls import reverse
from tcms.tests import LoggedInTestCase
from tcms.utils.permissions import initiate_user_with_default_setups


class TestBugAdmin(LoggedInTestCase):
'''
Contains Bugs related cases
'''

@classmethod
def setUpTestData(cls):
super().setUpTestData()
initiate_user_with_default_setups(cls.tester)

<<<<<<< HEAD
def test_user_clicks_add_bug_button(self):
'''
Click the add bug button on the admin-bugs page
Assert if being redirected to the bugs-new form
'''
response = self.client.get(reverse('admin:bugs_bug_add'))
self.assertRedirects(response, reverse('bugs-new'))
=======
def test_regular_user_can_add_bug(self):
response = self.client.get(reverse('admin:bugs_bug_add'))
self.assertRedirects(response, reverse('bugs-new'))
>>>>>>> 843de270... Add TestBugAdmin test file

0 comments on commit e587dd9

Please sign in to comment.