This repository has been archived by the owner on Jun 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Games unit tests #6
Open
maciejSamerdak
wants to merge
27
commits into
master
Choose a base branch
from
games-unit-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9bc8418
Add active and focus custom button style
MartynaAnnaGottschling 75a4678
Add missed custom button style to encyclopedia view
MartynaAnnaGottschling e4d1d27
Add missed PL translation to encyclopedia view
MartynaAnnaGottschling d8c5fbb
Add missed PL translation to game edit view
MartynaAnnaGottschling 8a80c7c
Add missed PL translation to users SignUp view
MartynaAnnaGottschling 8bbac86
[M] missed migrations after changing games models
MartynaAnnaGottschling 6ee78a0
Split game panel html and refresh js
MartynaAnnaGottschling c3d5a0e
Change PL translation for edit game form
MartynaAnnaGottschling 06cc42b
Split game panel and JS-gamer display
MartynaAnnaGottschling 9a9f252
Split game panel view and JS-adjust table size
MartynaAnnaGottschling ad691e1
Split game panel view and JS-win popup
MartynaAnnaGottschling ecd6226
Move JS to external 'scripts' folder
MartynaAnnaGottschling 52d6e47
Add unit tests for game access view.
maciejSamerdak 77033f6
Add gamer form tests
maciejSamerdak 6bd1a68
Add help view test
maciejSamerdak b420d38
Add encyclopedia view unit tests
maciejSamerdak 9d51e70
Add create game view unit tests
maciejSamerdak 6873d1e
Add game edit view unit tests
maciejSamerdak 484d677
Add generate game code function unit tests
maciejSamerdak 3a92933
Add end game view unit tests
maciejSamerdak a36f36f
Add stats game view unit tests
maciejSamerdak d2ac3c7
Add edit game form unit tests
maciejSamerdak d88bc1a
Update module referrences in games unit tests
maciejSamerdak 0e00c05
Delete tests.py in games/tests
maciejSamerdak faa8979
Add gamer edit form unit tests
maciejSamerdak f8c4f10
Add gamer order form unit tests
maciejSamerdak fc115c7
Fix missing timezone import in update_stats view
maciejSamerdak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from django.test import TestCase | ||
from django.urls import reverse | ||
from games.models import CharacterRace, CharacterClass | ||
from ipdb import set_trace | ||
|
||
|
||
class EncyclopediaViewTests(TestCase): | ||
def setUp(self): | ||
self.racename = 'Race' | ||
self.classname = 'Class' | ||
char_race = CharacterRace.objects.create( | ||
name=self.racename, | ||
description='This is a race' | ||
) | ||
|
||
char_class = CharacterClass.objects.create( | ||
name=self.classname, | ||
description='This is a class' | ||
) | ||
|
||
def test_help_view(self): | ||
url = reverse('games:encyclopedia') | ||
response = self.client.get(url) | ||
#set_trace() | ||
self.assertTrue(response.status_code, 200) | ||
self.assertTemplateUsed(response, 'games/encyclopedia.html') | ||
self.assertContains(response, self.racename) | ||
self.assertContains(response, self.classname) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blabla