Skip to content

Commit

Permalink
use modern dates for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Val committed Mar 20, 2020
1 parent cbef82d commit 7ef61ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/steps/checks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ def test_items_iteration(self):
runner = Runner(self.test_dir, join(self.test_dir, 'main.yaml'), None)
self.assertTrue(runner.run_tests())

# test if dates with dashes are not calculated as math
# test if dates with dashes are not calculated as math (old dates, i.e. 1973-03-10 are still calculated as math)
def test_compate_dates(self):
self.populate_file('main.yaml', '''---
steps:
- check:
equals: {the: '1973-10-12', is_not: '1973-12-10' }
equals: {the: '2020-03-11', is_not: '2020-11-03' }
''')
runner = Runner(self.test_dir, join(self.test_dir, 'main.yaml'), None)
self.assertTrue(runner.run_tests())
6 changes: 0 additions & 6 deletions test/steps/test/tmp/checks_test/main.yaml

This file was deleted.

1 change: 1 addition & 0 deletions test/utils/misc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def test_template_with_simple_object(self):
self.assertEqual(17, fill_template('{{ OUTPUT }}', {'OUTPUT': 17}))
self.assertEqual(4.2, fill_template('{{ OUTPUT }}', {'OUTPUT': 4.2}))
self.assertEqual('string', fill_template('{{ OUTPUT }}', {'OUTPUT': 'string'}))
self.assertEqual('2020-03-11', fill_template('{{ OUTPUT }}', {'OUTPUT': '2020-03-11'}))

# templates are being filled in correctly with complex objects
def test_template_with_complex_object(self):
Expand Down

0 comments on commit 7ef61ea

Please sign in to comment.