forked from mozilla/Addon-Tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_api_only.py
More file actions
37 lines (28 loc) · 1.37 KB
/
test_api_only.py
File metadata and controls
37 lines (28 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python
from addons_api import AddOnsAPI
from unittestzero import Assert
import pytest
#These tests should only call the api.
#There should be no tests requiring selenium in this class.
@pytest.mark.skip_selenium
class TestAPIOnlyTests:
def test_that_firebug_is_listed_first_in_addons_search_for_fire(self, testsetup):
"""TestCase for Litmus 15314"""
addons_xml = AddOnsAPI(testsetup, 'fire')
Assert.equal("Firebug", addons_xml.get_name_of_first_addon())
def test_that_firebug_is_listed_first_in_addons_search_for_firebug(self, testsetup):
"""TestCase for Litmus 15316"""
addons_xml = AddOnsAPI(testsetup)
Assert.equal("Firebug", addons_xml.get_name_of_first_addon())
def test_that_firebug_addon_type_name_is_extension(self, testsetup):
"""Testcase for Litmus 15316"""
addons_xml = AddOnsAPI(testsetup)
Assert.equal("Extension", addons_xml.get_addon_type_name("Firebug"))
def test_that_firebug_addon_type_id_is_1(self, testsetup):
"""Testcase for Litmus 15316"""
addon_xml = AddOnsAPI(testsetup)
Assert.equal("1", addon_xml.get_addon_type_id("Firebug"))
def test_firebug_version_number(self, testsetup):
"""Testcase for Litmus 15317"""
addon_xml = AddOnsAPI(testsetup)
Assert.equal("1.7.3", addon_xml.get_addon_version_number("Firebug"))