Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
software-dev-7054cem/Test/test_issue.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
32 lines (25 sloc)
1.11 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from issue import Issue | |
class TestIssue(unittest.TestCase): | |
def setUp(self): | |
self.__issue = Issue() | |
def test_issue_has_title(self): | |
self.__issue.set_title("problem with the bin") | |
title = self.__issue.get_title() | |
self.assertEqual(title, "problem with the bin") | |
def test_issue_has_type(self): | |
self.__issue.set_issue_type("bins") | |
type = self.__issue.get_issue_type() | |
self.assertEqual(type, "bins") | |
def test_issue_has_description(self): | |
self.__issue.set_description("there is a bin left outside 2 days before collection day") | |
description = self.__issue.get_description() | |
self.assertEqual(description, "there is a bin left outside 2 days before collection day") | |
def test_issue_has_postcode(self): | |
self.__issue.set_postcode("CV24EP") | |
postcode = self.__issue.get_postcode() | |
self.assertEqual(postcode, "CV24EP") | |
def test_issue_has_time(self): | |
self.__issue.set_time("03/04/2021 21:14") | |
the_time = self.__issue.get_time() | |
self.assertEqual(the_time, "03/04/2021 21:14") |