of simple unit test" def setup(self): self.char = 'a' def tearDown(self): del self.char def test_first_pass(self): "Asserting that the character is not b" self.assertNotEqual(self.char, 'b') def test_second_fail(self): "Making a false assertion" assert self.char != 'c'
for models a. the objects are being created and they have the desired relations as per specs b. the functions are returning correct values & manipulating db as per specs 2. Write test for forms - red, green a. states of forms b. perms. of good & bad forms, data 3. Write test for views a. response variable(200, 404) b. template & context variable c. behavior via decorator(@login_required etc.) 4. Write test for custom middlewares & template tags.
test my bot's strength, As a bot developer, I want to program my bot's decision making. Scenario: Boring Opponent Given the bots network has been trained When attacked by RA-One Then the bot should kill the opponent Scenario: Legendary opponent Given the bot's network has been trained When attacked by Robot Then the bot should bow down in respect! http://dannorth.net/whats-in-a-story/