예제 #1
0
    def test_find_all(self):
        self.repo = repositories.EnvironRepository()
        data = self.repo.find_all()
        key = 'key'
        # TODO must work in library not tests (move this if in lib)
        if sys.platform == 'win32':
            key = 'KEY'

        self.assertIn(key, data)
예제 #2
0
    def test_upper_case_sensitivity(self):
        self.repo = repositories.EnvironRepository()
        val = self.repo.find_one('UPPER_CASE_KEY')

        self.assertEqual('upper_case_value', val)
        self.assertIsNone(self.repo.find_one('upper_case_key'))
예제 #3
0
    def test_find_one_wrong_key(self):
        self.repo = repositories.EnvironRepository()
        val = self.repo.find_one('wrong_key')

        self.assertIsNone(val)
예제 #4
0
    def test_find_one(self):
        self.repo = repositories.EnvironRepository()
        val = self.repo.find_one('key')

        self.assertEqual('value', val)