Example #1
0
	def test_creating_new_branch(self):
		branch = Branch ()
		branch.branch_name = "Cebuana"

		branch.save()

		all_branch_in_database = Branch.objects.all()
		self.assertEqual(len(all_branch_in_database), 1)
		only_branch_in_database = all_branch_in_database[0]
		self.assertEquals(only_branch_in_database, branch)

		self.assertEquals(only_branch_in_database.name, "Cebuana")
Example #2
0
    def test_creating_new_branch(self):
        branch = Branch()
        branch.branch_name = "Cebuana"

        branch.save()

        all_branch_in_database = Branch.objects.all()
        self.assertEqual(len(all_branch_in_database), 1)
        only_branch_in_database = all_branch_in_database[0]
        self.assertEquals(only_branch_in_database, branch)

        self.assertEquals(only_branch_in_database.name, "Cebuana")